A86: Key Presses
[Prev][Next][Index][Thread]
A86: Key Presses
Hello all you smart 
ASM programmers,
 
    
I'm a newbie at this and I'm having trouble reading multiple keypresses.  I 
am reading the presses by writing to port 1 and reading from port 1 and I can 
read one key just fine, but I've heard that one can read more than one key press 
with the ports, but I am unsure how to do this.  Is reading the port the 
best way to do this or is _getky or _getkey better?  I'm trying to let them 
press +, -, or exit.  Here's my code:
 
Getkeypress:
    
ld a,%01111101
    
out (1),a
    
nop
    
nop
    
in a,(1)
    
bit 1,a
    
jr nz, Getkeypress
 
    
After that code it goes on to something that will change the contrast up, but I 
want to know how to make little routines for inc-ing the contrast, dec-ing the 
contrast, and ret-ing to the OS.
    
Am I making sense?
 
Bryan
Follow-Ups: