Skip to content

Instantly share code, notes, and snippets.

@shivajichalise
Created February 15, 2022 03:49
Show Gist options
  • Save shivajichalise/22988bbc32ee8bc5b8723acb2ebe3409 to your computer and use it in GitHub Desktop.
Save shivajichalise/22988bbc32ee8bc5b8723acb2ebe3409 to your computer and use it in GitHub Desktop.
Assembly language program to display a string 'POKHARA UNIVERSITY' character wise using macro to insert space between characters.
printSpace macro
mov dl, ' '
mov ah, 2
int 21h
endm
disp macro msg
mov cx, 12h
lea di, msg
for: mov dl, [di]
mov ah, 02h
int 21h
printSpace
inc di
loop for
endm
.model small
.stack 64h
.data
msg db "POKHARA UNIVERSITY$"
.code
main proc
mov ax,@data
mov ds,ax
disp msg
mov ax, 4c00h
int 21h
main endp
end main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment