Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- .stack 100h
- .data
- ;nl db 0dh, 0ah,'$'
- .code
- ;-------------------Addition-----------
- addm macro x,y
- mov cx,x
- add cx,y
- local L1
- L1:
- mov ah,2
- mov dl,x
- add dl,y
- add dl, '0'
- int 21h
- loop L1 ; --CX
- ;if CX == 0 break;
- ;else jmp L1
- endm addm
- ;----------------------------------------
- ;---------substraction macro-------------
- subm macro x,y
- mov cx, x
- sub cx, y
- local L1
- L1:
- mov ah,2
- mov dl,x
- mov dl,y
- add dl,'0'
- int 21h
- endm subm
- ;----------------------------------------
- main proc
- mov dx, @data
- mov ds, dx
- addm 3 2
- subm 5 3
- mov ah,4ch
- int 21h
- endp main
- end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement