This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Convert char input in a loop (lowercase -> UPPERCASE) | |
.model small | |
.stack 100h | |
.data | |
text db 'CONVERT LOWERCASE TO UPPERCASE $' | |
low db 'Lower: $' | |
up db 'Upper: $' | |
input db ? | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;loop to print a to z | |
.model small | |
.stack 100h | |
.data | |
.code | |
main proc | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;SWAP two input using xchg | |
.model small | |
.stack 100h | |
.data | |
a db '[a] : $' | |
b db '[b] : $' | |
a_in db ? | |
b_in db ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;swap between two register | |
.model small | |
.stack 100h | |
.data | |
.code | |
main proc | |
mov cl,'X' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;swap between two varible with intermediate register | |
.model small | |
.stack 100h | |
.data | |
a db ? | |
b db ? | |
.code | |
main proc | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;swap string with intermediate register | |
.model small | |
.stack 100h | |
.data | |
txt01 dw 'Programmer$' | |
txt02 dw 'Hacker$' | |
.code | |
main proc | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;take input char and increment by 1 in a loop | |
.model small | |
.stack 100h | |
.data | |
a db ? | |
text db 'THE END $' | |
.code | |
main proc | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;compare two input char and display Equal/Unequal (in a loop) | |
.model small | |
.stack 100h | |
.data | |
x db ? | |
;y db ? | |
eq db 'Equal $' | |
uneq db 'Unequal $' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;store input char in array and print in reverse way using [DI] | |
.model small | |
.stack 100h | |
.data | |
arr db ?,?,?,?,? | |
.code | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;reverse print by indexing register and using loop | |
.model small | |
.stack 100h | |
.data | |
.code | |
main proc | |
INPUT: mov ah,01 ;input char |