Question: Translation to structured code: THANKS!!!!!!!!!!! translate from assembly language to other python code Problem 1: LOAD 1, R1 LOAD 2,R2 LOAD 100, R3 loop: PRINT

Translation to structured code: THANKS!!!!!!!!!!! translate from assembly language to other pythonTranslation to structured code: THANKS!!!!!!!!!!!

translate from assembly language to other python code

Problem 1: LOAD 1, R1 LOAD 2,R2 LOAD 100, R3 loop: PRINT R1 ADD R2,R1 MOV R1,R4 NEG R4 ADD R3, R4 JGZ R4,loop Problem 2: ; assume Rl is set to an input value at start JZ Rl,end JLZ R1, label NEG R1 label: LOAD 10,R2 ADD R1,R2 JLZ R2, othercase PRINT 1 JMP end othercase: PRINT 0 end: Problem 1: LOAD 1, R1 LOAD 2,R2 LOAD 100, R3 loop: PRINT R1 ADD R2,R1 MOV R1,R4 NEG R4 ADD R3, R4 JGZ R4,loop Problem 2: ; assume Rl is set to an input value at start JZ Rl,end JLZ R1, label NEG R1 label: LOAD 10,R2 ADD R1,R2 JLZ R2, othercase PRINT 1 JMP end othercase: PRINT 0 end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!