rite an assembly language program that corresponds to the following C program: int num; int main () { scanf("%d", &num); num = num / 16; printf("num = %d\n", num); return 0; } okay i need this question in assembly code... But i do not need it in x86 assembly code or any other way. let me explain. my pep/9 computer simulator uses code such as... example: LDBA 'H',i ;Output 'H' STBA 0xFC16,d LDBA 'i',i ;Output 'i' STBA 0xFC16,d STOP .END
Write an assembly language
int num;
int main () {
scanf("%d", &num);
num = num / 16;
printf("num = %d\n", num);
return 0;
}
okay i need this question in assembly code... But i do not need it in x86 assembly code or any other way. let me explain.
my pep/9 computer simulator uses code such as...
example:
LDBA 'H',i ;Output 'H'
STBA 0xFC16,d
LDBA 'i',i ;Output 'i'
STBA 0xFC16,d
STOP
.END
Sooo i need the C program from the top the be translated into a program assembly language like the example i showed. any other way would be no help to me because this is the only code format im aware of.
the code format comes from Computer Systems
FIFTH EDITION
J. Stanley Warford.
please help me i would appreciate it alot if you could.
Step by step
Solved in 3 steps