Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .MODEL SMALL ; IN THIS COURSE ALL MODEL ARE SMALL
- .STACK 100H ; WE ALWAYS USE STACK 100H
- .DATA ; DATA SEGMENT
- A DW 5 ; A = 5
- B DW 2 ; B = 2
- SUM DW ? ; SUM = ?
- .CODE
- MAIN PROC ; MAIN CODE START HERE
- ; PROGRAMME SEGMENT PREFIX
- MOV AX,@DATA
- MOV DS,AX ; INITILATION OF DS
- MOV AX,A ; PUT A IN REGISTER
- ADD AX,B ; ADD B IN REGISTER AND CALCULATE SUM
- MOV SUM,AX ; RESULT PUT IN SUM
- ; THERE IS NO OUTPUT SO OUTPUT IS BLANK
- MOV AX,4CH ; TERMINATED THE CODE AND EXIT
- INT 21H
- MAIN ENDP
- END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement