Question: I have written a little bit of the code. help me ASAP # Task 2: Maximum # Your goal for this task is to set
I have written a little bit of the code. help me ASAP
\# Task 2: Maximum \# Your goal for this task is to set a register to the maximum of two registers The A and B registers will be initialized with arbitrary values The C register should hold the maximum of A and B \# Note that the initial values for A and B are just \# an example. Your code should work for any values of A and B A: 5; C: 0; \# Goal: C=MAX(A,B) If A=3 and B=4, then C=4 If A=2 and B=3, then C=2 If A=5 and B=5, then C=5 If A=5 and B=5, then C=5 \# IF statements in VMAL: If you wanted to impelment the following C code in VMAL, if(A==0){ then the resulting MAL would look something as follows: SF A; BIZ IF_START_1; GO IF_END_1; IF_START_1; // STUFF (translated to VMAL) LBL IF_END_1; In order to do conditional statements with VMAL, you are \# going to have to be creative! \# Note: if you want to use BIN or BIZ, you must first \# do the SF operation to set the N and Z flags. \# Start your code herel SF A; BIZ IF_START_ 0 ; GO IF_END_0; 0; LBL IF_END_0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
