Assembly language program to declare an array and save 5 numbers in it

Code

org 100h
.stack 100h
.data
array db 1,2,3,4,5
.code
main proc
    mov ax,@data
    mov ds,ax
    
    mov cx,5
    mov si,offset array
    
    lable:
    mov dx,[si]
    add dx,48
    mov ah,02
    int 21h
    
    inc si
    loop lable
    
    mov ah,4ch
    int 21h
    main endp
    end main

Output



Comments

Popular posts from this blog

Assembly language program to input an integer from user and display whether the number is even or odd

Assembly language program to input string from user and display it

Assembly language program to input string from user and display its length