Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Given three variables of type byte corresponding to three lowercase alphabetic characters (ASCII)
- ;–Var1 = ‘a’
- ;–Var2 = ‘s’
- ;–Var3 = ‘m’
- ;Write a program that prints on the screen the three characters converted to uppercase
- DIM EQU 32 ;32 because if I have a lowercase character and I subtract 32, into ASCII code, I get corresponding uppercase character
- .MODEL small
- .STACK
- .DATA
- Var1 DB 'a'
- Var2 DB 's'
- Var3 DB 'm'
- .CODE
- .STARTUP
- MOV DL,Var1
- SUB DL,DIM
- MOV AH,2
- INT 21H ;In AH there is value 2, so here I say "PRINT the value in DL"
- MOV DL,Var2
- SUB DL,DIM
- INT 21H
- MOV DL,Var3
- SUB DL,DIM
- INT 21H
- .EXIT
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement