Cs401p Assignment 2 Solution
Cs401p Assignment 2 Solution
Fall 2024
For Paid Assignment 03309879190
Screenshot
Code
[org 0x0100]
jmp start
id: db 2, 0, 0, 4, 1, 7, 6, 1, 7
sum: dw 0
start:
mov cx, 9
xor ax, ax
sum_loop:
add ax, bx
inc si
loop sum_loop
mov [sum], ax
xor dx, dx
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
int 0x21