Department of Electrical and Computer Engineering
University of Texas at Austin
EE 379K
Fall 2000
Y. N. Patt, Instructor
TAs: Kathy Buchheit, Laura Funderburg, Chandresh Jain, Onur Mutlu,
Danny Nold, Kameswar Subramanian, Francis Tseng, Brian Ward
Solutions to Exam 2
Problem 1
Part 1
There's no memory location xF401.
Problem 2
Part a
| Symbol
| Address
|
| AGAIN | x3002
|
| ASCII | x3009
|
| NEG | x300A
|
| CRTSR | x300B
|
| CRTDR | x300C
|
| Address
| Instruction
|
| x3000 | 0010000000001001
|
| x3001 | 0010001000001010
|
| x3002 | 1010010000001011
|
| x3003 | 0000011000000010
|
| x3004 | 1011000000001100
|
| x3005 | 0001000000100001
|
| x3006 | 0001010000000001
|
| x3007 | 0000101000000010
|
| x3008 | 1111000000100101
|
| x3009 | 0000000000110000
|
| x300a | 1111111111000110
|
| x300b | 1111001111111100
|
| x300c | 1111001111111111
|
Part b
Outputs 0123456789 to the console.
Problem 3
A determines whether or not the branch will be taken.
Problem 4
Problem 5
The linkage back to the main program is lost. (JSR B overwrites R7 which contains the return link.)
Problem 6
Bug 1
.FILL x30000
Too big value, cannot be represented in 16 bits. Assemble-time error.
Bug 2
JSR SQRT
SQRT is not on the same page as instruction JSR SQRT. Link-time error.
Problem 7