PROGRAM 4: Quad Table Using the ROL instruction to perform doubling, write a program to produce a quad table. This tabl
Posted: Tue Jul 12, 2022 8:03 am
PROGRAM 4: Quad TableUsing the ROL instruction to perform doubling, write a program toproduce a quad table. This table should be built from asingle int32 value provided by the user and print three rows fromthe starting value, each offset by one from the starting value. Inthat column, the pattern of quad numbers should be calculated bydoing ROL instructions twice on each value. For example, thefollowing output should be produced when the user inputs thestarting value 4:Gimme a starting value: 4Quad Table4: 16 645: 20 806: 24 96
For example, the following output should be producedwhen the user inputs the starting value 7:
Gimme a starting value: 7Quad Table7: 28 1128: 32 1289: 36 144
8:44 Back progID; Programmer's Reference to HLA Assembly Language Typical Program Structure program MOV ADD end progID; Assembly Language Instructions Description SUB SHL referenceguideii.htm Instruction Syntax mov ( source, dest); #include ( "stdlib.hhf" ); static SHR variable declarations begin progID; statements Dashboard add ( source, dest); sub ( source, dest); sh1 ( count, dest); shr ( count, dest); Calendar dest= source; dest += source; dest -= source; shuffles left a total of count bits in dest operand; int8 int16 sets carry int32 when count=1 shuffles right a total of count bits in dest operand; sets carry when count=1 shuffles right a Available Datatypes To Do boolean A Available I/O Routines stdout.put stdout.puti8 stdout.putil6 Notifications Inbox
For example, the following output should be producedwhen the user inputs the starting value 7:
Gimme a starting value: 7Quad Table7: 28 1128: 32 1289: 36 144
8:44 Back progID; Programmer's Reference to HLA Assembly Language Typical Program Structure program MOV ADD end progID; Assembly Language Instructions Description SUB SHL referenceguideii.htm Instruction Syntax mov ( source, dest); #include ( "stdlib.hhf" ); static SHR variable declarations begin progID; statements Dashboard add ( source, dest); sub ( source, dest); sh1 ( count, dest); shr ( count, dest); Calendar dest= source; dest += source; dest -= source; shuffles left a total of count bits in dest operand; int8 int16 sets carry int32 when count=1 shuffles right a total of count bits in dest operand; sets carry when count=1 shuffles right a Available Datatypes To Do boolean A Available I/O Routines stdout.put stdout.puti8 stdout.putil6 Notifications Inbox