Question: PROGRAM 5 : Real Big Number! Write an HLA Assembly language program that prompts for n , an int 8 value, and then displays a
PROGRAM : Real Big Number!
Write an HLA Assembly language program that prompts for n an int value, and then displays a repeated digit pattern starting with that number. The repeated digit pattern should print all the values from up to n then all the values from up to n then all the values up to n then all the values up to and end with a single Shown below is a sample program dialogue.
Gimme a decimal value to use for n:
Here's your answer:
Gimme a decimal value to use for n:
Here's your answer:
Hint: The digit pattern is too large to store into any datatype we have learned to date so I am expecting that you will use a loop with CMP instructions and a conditional jump to print individual digits, rather than store the complete number in a variable, just like the sample programs in this unit demonstrate
Additional Hint: You should not be using high language statements like for, while or repeat loops, as these are not assembly instructions are off limits in this course.
Withoug using high level programming such as loops and if statements.
Here is my c code that works but want to convert to HLA assembly
#include
void printDigitPatternint n
int i j;
for i ; i n; i
for j ; j i; j
printfd j;
for i n ; i ; i
for j ; j i; j
printfd j;
printf
; End with a single and newline
int main
int n;
printfGimme a decimal value to use for n: ;
scanfd &n;
printfHeres your answer: ;
printDigitPatternn;
return ;
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
