Google

Dec 17, 2008

program to find the sum of squares of n numbers

program to find the sum of squares of n numbers

initially we load the si and di registers and we move contents of si to that of cl and then we continue to increment si and move si to al and multiply the current result with al. Then we move contents of si to that of bl and we multiply bl and add the result in ax to that of di.

the code can be analyzed as follows

mov si,2000
mov di,4000
mov cl, [si]
inc si
mov dx,0
l1 mov ah,00
mov l,[si]
add dx,ax
inc si
loop l1
Mov [di],dx
int a5

1 comment:

jo said...

can u post a 8085 program for sum of n power n numbers

thanks