30 likes | 181 Views
Array : To store multiple value in one variable , “but value must be homogenous or similar type” is called array. We can say in other word Arrangement of similar type of data in memory in one variable is called array.
E N D
Array : To store multiple value in one variable , “but value must be homogenous or similar type” is called array. We can say in other word Arrangement of similar type of data in memory in one variable is called array.
Program.-(12)* Write a program to input 10 number in array and display 10 numbers from array. • Declare array of ten elements • Store 10 into CX • Assign Base Address of array into SI • Input a number in AL • Store AL to SI • Increment in SI • If CX !=0 Then go to step 4 • Again Store 10 into CX • Assign Base Address of array into SI • Display value of SI 11 Increment in SI 12 if CX != 0 then go to step 10 13 End of program
.model small .stack 100h .data array db 10 dup(0) .code main proc movax,@data movds,ax lea si,array mov cx,10 top: mov ah,2 mov dl,0dh int 21h mov dl,0ah int 21h mov ah,1 int 21h sub al,30h mov [si] ,al inc si loop top lea si,array mov cx,10 mov ah,2 Top1: mov dl,[si] add dl,30h int 21h incsi loop top1 mov ah,4ch int 21h Main endp End main