You are on page 1of 1

data segment

sum db 4 DUB('$')
m1db 10,13,'the sum of square:$'
data ends
code segment
assume ds:data,cs:code
mov ax,SEG data
mov dx,0000
mov cx,0010
mov al,01
again: mov bh,al
mul bh
add ax,dx
mov dx,ax
inc al
loop again
itoa sum,dx
mov ah,09h
movdx,offset m1
int 21h
mov ax,09h
movdx,offset sum
int 21h
mov ax,4c00h
int 21h
code ENDS

You might also like