Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Given the following variables of type byte already initialized in memory:
- ;•n1 db 10
- ;•n2 db 10h
- ;•n3 db 10b
- ;Compute the following expression, the result of which will be saved into variable byte called 'res':
- ;•n1 + n2 – n3
- .MODEL small
- .STACK
- .DATA
- n1 DB 10
- n2 DB 10h
- n3 DB 10b
- res DB ?
- .CODE
- .STARTUP
- MOV AL,n1
- ADD AL,n2
- SUB AL,n3
- MOV res,AL
- .EXIT
- END
- ;NB: Here, when I add or subtract numbers with several base, I don't need of convert, because it does automatically
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement