Question: PROGRAM 4 : Rolling Table number should be ROL'ed and then ROR'ed and then ROL'ed and then ROR'ed, as shown below. For example, the following
PROGRAM : Rolling Table
number should be ROL'ed and then ROR'ed and then ROL'ed and then ROR'ed, as shown below. For example, the following output should be produced when the user inputs the starting value :
For example, the following output should be produced when the user inputs the starting value :
Note: To receive full credit, you must use ROL and ROR to solve this problem.
Hint: Again, please don't worry too much about the spacing in the table. As with the prior week's assignment, the goal is to practice working with HLA...
this is my code
program RollingTable;
#include "stdlib.hhf
static
startValue: int;
rolled: int;
rolled: int;
rolled: int;
temp: int; Temporary register
begin RollingTable;
stdout.put "Gimme a starting value: ;
stdin.get startValue ;
stdout.put "Rolling Table", nl ;
mov startValue, al ;
rol al ;
ror al ;
mov al temp ;
rol al ;
ror al ;
stdout.put startValue, : al;
inc al ;
mov al temp ;
rol al ;
ror al ;
mov al temp ;
rol al ;
ror al ;
stdout.put startValue, : al;
inc al ;
mov al temp ;
rol al ;
ror al ;
mov al temp ;
rol al ;
ror al ;
stdout.put startValue, : al;
stdout.put nl ;
end RollingTable;
Heres the feedback on it Your RollingTable Code Builds And Runs But Only Shows One Line Of Output. Please Revise And Resubmit Your Work For Additional Credit. Partial Credit.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
