Page 140 - Introduction to Microcontrollers Architecture, Programming, and Interfacing of The Motorola 68HC12
P. 140
PROBLEMS 117
2 9. Write a shortest subroutine PASS2 for "SA2" that writes in the object and listing,
reporting error 2 if an illegal opcode appears, and error 3 if a symbol is not found,
"Include" the answers to Problems 24 to 27 (don't write them). A listing line consists of
a hexadecimal line number, the two-byte hexadecimal code, and the line of source code. If
an error occurs, the next line shows "error" hexadecimal error number.
30. Write a shortest subroutine SYMLTBL for "SA2" that prints its symbol table.
Assume the answers to Problems 24 and 27 are "included," and use PUT to print the
ASCII character in accumulator A (don't write them, and assume they do not change the
registers used in the subroutine SYMLTBL). Each line lists a symbolic name and its
hexadecimal value that was stored in a row of the symbol table.