cs401pAss
cs401pAss
Code :
[org 0x0100]
jmp start
id db 2,3,0,2,0,8,6,8,4
sum: dw 0
start:
mov cx, 9
mov si, id
xor ax, ax
sum_loop:
add ax, bx
inc si
loop sum_loop
mov [sum], ax
mov dx, 0
mov bx, 3
div bx
cmp dx, 0
je divisible_by_3
jmp not_divisible
divisible_by_3:
mov dx, 1
jmp done
not_divisible:
mov dx, 0
done:
int 0x21