Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- waitfor2ndPROTO:
- di ; disable OS interrupts
- ld hl, DI_Mode
- ld a, %00000010 ; set bit 1 to true, which puts the LCD in scan mode 2
- ld (hl), a
- xor a, a ; set a to 0, which is the scanmode we should be in to continue
- waitforLCDidle:
- cp (hl)
- jp nz, waitforLCDidle
- ld hl, kbdG1 ; load keyboard row 1 into hl and read the value into accumulator
- ld a, (hl)
- cp %00100000
- jp nz, waitfor2ndPROTO
- ld hl, kbdG1
- ld (hl), 0
- ei ; reenable interrupts
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement