KNOW:
BE ABLE TO:
Sample Exam Question:
(Problem 9.16 from the textbook) The two code sequences a and b are assembled separately. There are two errors. Identify the bugs and describe why each bug will cause an error, and identify whether the errors will be detected at assembly time or at link time.
a. .ORIG x3200 SQRT ADD R0, R0, #0 ; code to perform square root function ; and return the result in R0 RET .END b. .EXTERNAL SQRT .ORIG x3000 LD R0, VALUE JSR SQRT ST R0, DEST HALT VALUE .FILL x30000 DEST .FILL x0025 .END