0% found this document useful (0 votes)
63 views1 page

.Model Small .Stack 64 .Data A DB 02h, 02h, 02h, 02h, 02h, 02h, 02h, 02h, 02h, 02h

This program loads an array of 10 bytes with the value 02h into memory and then uses a loop to add the values together, storing the result in the AL register. It then divides the result by 10 and exits the program, returning the divide result in the AH register.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views1 page

.Model Small .Stack 64 .Data A DB 02h, 02h, 02h, 02h, 02h, 02h, 02h, 02h, 02h, 02h

This program loads an array of 10 bytes with the value 02h into memory and then uses a loop to add the values together, storing the result in the AL register. It then divides the result by 10 and exits the program, returning the divide result in the AH register.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

.model small .stack 64 .

data a db 02h,02h,02h,02h,02h,02h,02h,02h,02h,02h

.code

start: mov ax,@data mov ds,ax mov cl,10 lea si,a mov ax,0000h again: add al,[si] inc si dec cl jn again mov cl,0ah div cl mov ah,4ch int 21h end start .end

You might also like