0% found this document useful (0 votes)
13 views3 pages

Cs401p Assignment 2 Solution

Uploaded by

bc240206405ifa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

Cs401p Assignment 2 Solution

Uploaded by

bc240206405ifa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Cs401p Assignment No 2

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

For Paid Assignment 03309879190 Page 1


mov si, id

xor ax, ax

sum_loop:

mov bl, [si]

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

For Paid Assignment 03309879190 Page 2


done:

mov ax, 0x4C00

int 0x21

For Paid Assignment 03309879190 Page 3

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy