Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include 'emu8086.inc'
- ORG 100H
- MOV AX,a ;moves a into AX
- ADD AX,b ;adds b into ax
- ADD AX,c ;adds c into ax
- CALL PRINT_NUM ;Print num
- MOV SI,OFFSET newline ;new linie
- CALL PRINT_STRING ;sets new line
- MOV AX,x ;moves 100 into ax
- SUB AX,y ;minues 30 into ax
- SUB AX,13 ;minuses 13 more
- CALL PRINT_NUM
- MOV SI,OFFSET newline
- CALL PRINT_STRING
- ret
- ;predefined procedures
- DEFINE_PRINT_STRING
- DEFINE_PRINT_NUM
- DEFINE_PRINT_NUM_UNS
- ;variable declaration
- a dw 2
- b dw 5
- c dw 6
- x dW 100
- y dW 30
- total db 0
- msg db "HEllO",0
- newline DB 13,10,0 ; 10 is line feed, 13 is carriage return 13 is go the beginning of the line. 10 is go to the next line
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement