Nintendo DMG-01 Manual - Page 32
Interrupts - gameboy serial #
View all Nintendo DMG-01 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 32 highlights
2.11. Serial I/O Game BoyTM CPU Manual allows a certain amount of synchronization with each serial port. The state of the last bit shifted out determines the state of the output line until another transfer takes place. If a serial transfer with internal clock is performed and no external GameBoy is present, a value of $FF will be received in the transfer. The following code causes $75 to be shifted out the serial port and a byte to be shifted into $FF01: ld a,$75 ld ($FF01),a ld a,$81 ld ($FF02),a 2.12. Interrupts 2.12.1. Interrupt Procedure The IME (interrupt master enable) flag is reset by DI and prohibits all interrupts. It is set by EI and acknowledges the interrupt setting by the IE register. 1. When an interrupt is generated, the IF flag will be set. 2. If the IME flag is set & the corresponding IE flag is set, the following 3 steps are performed. 3. Reset the IME flag and prevent all interrupts. 4. The PC (program counter) is pushed onto the stack. 5. Jump to the starting address of the interrupt. Page 32 V 1.01