Question: Write pseudocode for a program that allows the user to input two numbers (X and Y) and a code C. If the code has value

Write pseudocode for a program that allows the user to input two numbers (X and Y) and a code C. If the code has value 1, the program should output the larger of X and Y and otherwise output the smaller.

Now convert your pseudocode to the assembly language displayed in the pictures attached.  Write pseudocode for a program that allows the user to input

two numbers (X and Y) and a code C. If the code

Message load x store x clear x add x increment x subtract x decrement x compare x x-> R R-> x 0 -> X R + x -> R X + 1 -> X R - X -> R X - 1 -> x if x > R then 100 -> CCR elseif x CCR elseif x = R then 010 -> CCR goto x goto xif CCR = 100 goto xif CCR = 010 goto xif CCR = 001 goto xif CCR != 010 store input in x output x jump x jumpgtx jumped x jumpit x jumpne x in x out x halt OK Figure 10.1 Typical Assembly Language Instruction Set Binary Op Code Operation Meaning + 0000 LOAD X CON(X) 0001 STORE X R CON(X) 0010 CLEAR X 0 CON(X) 0011 ADD X R+ CONX) 0100 INCREMENT X CON(X) + 1 CON(X) 0101 SUBTRACT X R-CON(X) R 0110 DECREMENT X CON(X) - 1 CON(X) 0111 COMPAREX if CON(X) > R then GT = 1 else 0 if CON(X) = R then EQ = 1 else 0 if CON(X)

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!