1
16 points
|
Create the symbol table entries generated by the LC-2 assembler when
translating the following routine into machine code:
.orig x3000 |
||||||||||||
2
10 points
|
For each of the items below, indicate whether the calling function or the called function performs the action.
|
||||||||||||
3
34 points
|
You will use the LC-2 editor and simulator for this problem. This sentence contains a web link for an LC-2 Assembly Language program in a file named hw4p3.asm. Save this file in the folder containing your LC-2 software. What you'll find in the file is a translation of a C program named hw4p3.c (the C code is provided just to give you an overview of the program). Assemble the program and load it in the simulator. Do not alter the program before answering the following questions.
|
||||||||||||
4
40 points
|
Consider the following C program fragment: In a partial translation of the program into Assembly Language using the runtime stack, the following subroutines have been written for fnc1 and fnc2:void main() SR1 LDR R2, R6, #3 ; load k into R2
|
||||||||||||
|
|