Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Offering 750points per question. Thanks for the help. 1. Develop a sequence of i

ID: 3565475 • Letter: O

Question

Offering 750points per question. Thanks for the help.

1. Develop a sequence of instructions that searches through a block of 100H bytes of memory. This program must count all the unsigned numbers that are above 42H and all that are below 42H. Byte-sized data segment memory location UP must contain the count of numbers above 42H, and data segment location DOWN must contain the count of numbers below 42H.

2. Write a procedure that sums EAX, EBX, ECX, and EDX. If a carry occurs, place a logic 1 in EDI. If no carry occurs, place an O in EDI. The sum should be found in EAX after the execution of your procedure.

Explanation / Answer

UP DB 0

DOWN DB 0
MOV DI, OFFSET BLOCK ;address data
MOV CX, 100 ;load counter
MOV AL, 42H ;put 66 IN AL

AGAIN: CMP AL, [DI] ;search
JA L1
INC DOWN
JMP L2

L1: INC UP

L2: DEC DI
LOOP AGAIN

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote