data1 segment
array db 16h,03h,08h,32h
count1 equ 04h
data1 ends
code1 segment
assume cs:code1,ds:data1
start: mov ax,data1
mov ds,ax
mov cx,count1
xor ax,ax
mov si,offset array
forward:add al,[si]
inc si
loop forward
mov cx,count1
div cx
mov [si+1],al
mov [si+2],ah
mov ah,4ch
int 21h
code1 ends
end start
;RESULT1: 16+3+8+32 = 53/4 = CO: 14
; RE: 03
;RESULT2: 12+4+6+17 = ?
back to itmp lab