KNOW:
BE ABLE TO:
Sample Exam Question: Find the bug in the following program, which is supposed to read in a character, and output the next consecutive character (i.e. if the user inputs 'A', the program displays 'B'):
.orig x3000 in ; TRAP x23 - char comes back in r0 add r7, r0, #1 ; increment character lea r0, message ; r0 gets address of message puts ; TRAP x22 - message is displayed add r0, r7, #0 ; move the incremented char back to r0 for output out ; TRAP x21 - display char in r0 halt ; TRAP x25 message .stringz "Here is the incremented character: " .end