Created
December 9, 2023 13:33
-
-
Save MahraibFatima/f4df778d37e3d576ed90b07f64cea012 to your computer and use it in GitHub Desktop.
print integer array in assembly language
This file contains 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
org 100h | |
.data | |
array db 1h, 2h ,3h ,4h | |
.code | |
main proc | |
mov ax, @data | |
mov ds, ax | |
mov si, offset array | |
mov cx, 4 | |
loop1: | |
mov dx, [si] | |
add dx, 48 | |
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