Instructor Notes
March 10, 2008
Assignment Reminders
- Initial Project Proposal was do yesterday at midnight
- Midterm: March 12
- Hello Noise: March 25th
- focus on sound effects for the games
midterm review
- DAA
JR. Example:
Mem Loc Hex Op Code 0351 18 01 JR $0354 0353 00 NOP 0354
- indirect addressing
- EQU, db
- review of the generic qualities of labels
- jp [hl]
- ldi a,[hl] = ld a,[hl+]
- ldh vs. ld
- bit, set, reset, shifts and rotates (see upper right hand corner crib sheet page 1.
- carry flag
- bit mask
- T states and M cycles
Test Questions
- Write something that will do a simple task.
- I give you all the comments but not the opcodes
- make sure you understand how the tiles relate to ASCII for this one
- uses DAA
- understand swap, bit masks
- hand-assemble some code.
- calculate how long something takes to execute
- understand the distinction between T states and M cycles.
Know how to read the GameBoy crib sheet for this information
- Write a simple routine to do simple 16-bit integer arithmetic
- Show you understand the distinctions of labels, EQU, DB, etc.
- You will be given two very small snippets of code and asked if they perform their intended function.
- Verbatim from the exam:
hello-broken.asm is hello-sprite.asm with some lines changed from the original and shown in bold.
- Compare hello-broken.asm with hello-sprite.asm. For each changed line, write if the altered code will still operate with the same functionality as the original.
- If the altered line breaks the code or significantly alters its functionality, explain why. If the altered line does not significantly change the functionality, explain why not.
- Show in your answers that you understand the functionality of both the original and the altered lines. An example correct response for a specific line might be “This line breaks the code. We need to load register a into the contents of the memory location pointed to by 16-bit register pair hl, rather than the value of register hl itself.” In contrast, a correct observation but incorrect response would be “line should read ld [hl],a instead of ld hl,a.” This latter response does not show that you understand the function of the original code and the function of the altered code.
Construct a simple macro. I give you hello-sprite.inc to remind you of macro syntax
Questions you might have
- Ascii and tile maps
- hand assembly