Check if content in memory location X3100 is odd Count the n

Check if content in memory location X3100 is odd Count the number of is in memory X3100 and store the count in X3102 Check if R_1 is odd If not R_2 = 1 If true store R_2 X3100 Assembly Orig X3000 NAD R_2, R_2, notequalto 0 ld, r_1, X0FF AND R_2, R_1, X0001 BR_2

Solution

.ORIG x3000 LD R0,NUM AND R1,R0,1 BRZ EVEN LEA R0,ODD BRNZP DISP EVEN LEA R0,EVN DISP PUTS HALT NUM .FILL 0x1C EVN .STRINGZ \"EVEN\ \" ODD .STRINGZ \"ODD\ \" .END
 Check if content in memory location X3100 is odd Count the number of is in memory X3100 and store the count in X3102 Check if R_1 is odd If not R_2 = 1 If true

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site