Skip to content

Instantly share code, notes, and snippets.

@MahraibFatima
Last active December 9, 2023 13:42
Show Gist options
  • Save MahraibFatima/9ef1e7e07c1bc22888fdc70c19bbf3fe to your computer and use it in GitHub Desktop.
Save MahraibFatima/9ef1e7e07c1bc22888fdc70c19bbf3fe to your computer and use it in GitHub Desktop.
print a string using loop in asm
org 100h
.data
array db 'Hello World!$'
.code
main proc
mov ax, @data
mov ds, ax
mov si, offset array
mov cx, 12
loop1:
mov dx, [si]
mov ah, 2
int 21h
inc si
loop loop1
mov ah,4ch
int 21h
main endp
end main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment