Reading the keyboard in assembler
Posted: Sat Feb 17, 2018 5:23 pm
I'm trying to get to grips with reading the keyboard with assembler.
I appreciate the low byte of all the addresses for scanning the sets of keys is FE or 254.
One text I'm reading says load the BC register pair with the appropriate address such as 61438 then use an in a,(c). Then start reading the bits which is clear.
The other book I'm reading does things rather differently. First it uses LD A,0EFH then IN A,(0FEH). Is there significance in the leading zero of the hexadecimal number?
I'm struggling to understand what the second method is doing. Can anyone provide me with enlightenment?
I appreciate the low byte of all the addresses for scanning the sets of keys is FE or 254.
One text I'm reading says load the BC register pair with the appropriate address such as 61438 then use an in a,(c). Then start reading the bits which is clear.
The other book I'm reading does things rather differently. First it uses LD A,0EFH then IN A,(0FEH). Is there significance in the leading zero of the hexadecimal number?
I'm struggling to understand what the second method is doing. Can anyone provide me with enlightenment?