Last active
July 25, 2017 19:01
-
-
Save menon92/3d2ea7e74cccb879b0d656705e0cd928 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; addition of two number. | |
; Tested on emulator 8086 | |
.CODE | |
MAIN PROC | |
MOV AX, 10 | |
MOV BX, 2 | |
ADD AX, BX | |
AAM ; take carry if any | |
; convert to char | |
ADD AH, 48 | |
ADD AL, 48 | |
MOV BX, AX ; copy data to bx | |
MOV AH, 2 ; print function | |
MOV DL, BH ; print BH data | |
INT 21H | |
MOV DL, BL ; print BL data | |
INT 21H | |
END MAIN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment