Prev: A345 Up: Map Next: A606
A5F1: Holds copies of key states.
Used by the routine at Keys_UpdateAction.
Runs through every keybaord layer stores the state.
Keyboard_GetState A5F1 LD HL,KeyState_BtoSpace
A5F4 LD E,$80 Bit mask
A5F6 LD BC,$7FFE Keyboard layer B to SPACE.
Keyboard_GetState_0 A5F9 IN D,(C) Get keyboard layer state.
A5FB LD (HL),D
A5FC AND A
A5FD RR E Shift bit mask by 1 to the right
A5FF RET Z If E is left empty, end.
A600 DEC HL Move to previous key state store.
A601 LD A,B Use bitmaks to move address to next key layer.
A602 ADD A,E
A603 LD B,A
A604 JR Keyboard_GetState_0
Prev: A345 Up: Map Next: A606