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 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 output should be produced when the user inputs the starting value 4:
For example, the following output should be produced when the user inputs the starting value 12 :
(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: int8;
rolled1: int8;
rolled2: int8;
rolled3: int8;
temp: int8; // Temporary register
begin RollingTable;
stdout.put( "Gimme a starting value: ");
stdin.get( startValue );
stdout.put( "Rolling Table", nl );
mov( startValue, al );
rol(1, al );
ror(1, al );
mov( al, temp );
rol(1, al );
ror(1, al );
stdout.put( startValue, ": ", al,"");
inc( al );
mov( al, temp );
rol(1, al );
ror(1, al );
mov( al, temp );
rol(1, al );
ror(1, al );
stdout.put( startValue, ": ", al,"");
inc( al );
mov( al, temp );
rol(1, al );
ror(1, al );
mov( al, temp );
rol(1, al );
ror(1, 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.
PROGRAM 4 : Rolling Table number should be ROL'ed

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 Finance Questions!