Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this section, you'll read two assembly programs. For each one, 1) explain what it does in a sentence or two, and 2) translate it

image text in transcribedIn this section, you'll read two assembly programs. For each one, 1) explain what it does in a sentence or two, and 2) translate it to pseudocode that uses structured-programming features like if/then, while loops, etc. You can translate to real Python code instead of pseudocode if you prefer. Thanks

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions

Question

(b) \Vrite the symbolic statement (ne q V p) 9 r in words.

Answered: 1 week ago