Addition of Two 8-Bit Numbers With Indirect Addressing Mode
Addition of Two 8-Bit Numbers With Indirect Addressing Mode
;OUTPUT: 99
;FLOATING POINT OPERATION:(Q8 FORMAT)
;INPUT:
;FLOAT HEX
;0.2 0.2*256=51.2D=33H
;0.4 0.4*256=102,4D=66H
;OUTPUT:
;HEX DECIMAL FLOAT
;99 153 153/256=0.6
5. Largest number
code segment
assume cs:code,ds:code
org 1000h
start:
MOV DI,3000H
mov al,04h
mov bl,03h
mul bl
mov [DI],ax
hlt
mov ah,4ch
int 21h
code ends
end start
end
code segment
assume cs:code,ds:code
org 1000h
start:
mov al,15h
add al,30h
mov si,2000h
mov [si],al
hlt
mov ah,4ch
int 21h
code ends
end start
end
DIV BL Divide word in AX by byte in BL; Quotient in AL, remainder in AH
MOV DI,2000H
MOV AX,0008H
MOV BL,02H
DIV BL
MOV [DI],AX
HLT
11.BCD arithmetic using MASM
code segment
assume cs:code,ds:code
org 1000h
start:
MOV SI,2000
MOV AL,06H
ABB AL, 07H
DAA
MOV [SI],AL
HLT
mov ah,4ch
int 21h
code ends
end start
end
TRIANGULAR WAVE:
12. Perform matrix addition and subtraction using 8086 using MASM.