;PROGRAM TO ADD MANY NUMBERS
data segment
list db 24h,56h,0aah,7ah
cnt equ $-list
res db 0
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
mov cl,cnt
lea si,list
mov al,[si]
dec cl
cnti:
inc si
add al,[si]
jnc pos
inc [res+1]
pos:
dec cl
jnz cnti
mov res,al
int 3
code ends
end start
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment