16 Program to add two 16 bit number in 8086 Microprocessor.

Code:

; Program to add 2 16bit number
.MODEL SMALL
.STACK 100

.CODE     
  MOV AX,8960H ; Load first number in AX
  MOV BX,7C60H ; Load second number in BX

  ADD AX,BX ; Add AX and BX

  MOV DX,AX ; Storing data from AX to DX

  MOV AH,2  ; Service Routine to Print contain of DX
  INT 21H

  MOV AH,4CH ; Service Routine to exit
  INT 21H
END



Ouput:


Previous
Next Post »