Re: A86: simple code I can't figure out


[Prev][Next][Index][Thread]

Re: A86: simple code I can't figure out




_get_key is like _getky, but it doesn't waste time converting to the
TI-BASIC format for OP2.  The Usgard call was either a rom call on the 85 or
a built in function.  I found this routine in Pat Milheron's Pede86, it
looks like it'd be the same as READ_KEYPAD:

;---------------------------------------------------------------
; strobeKbd - strobe one or more lines of the keyboard and read
;       the resulting active lines.
;
;  input: a := lines to strobe, up to 8 lines, each
;        bit represents one line.
;        Complementary logic is used:
;    0 = strobe
;    1 = don't strobe
;        output: a := lines read from keyboard
;  maximum stack used: 2 bytes.
; registers destroyed: b.
;---------------------------------------------------------------
strobeKbd:
 out (kbdPort),a  ;strobe the keyboard
 nop    ;give hardware time to respond
 nop
 nop
 nop
 in a,(kbdPort)  ;read keyboard
 ld b,a
 ld a,0FFh   ;float all keyboard lines
 out (kbdPort),a
 ld a,b
 ret

>
> Speaking of key routines, does the 86 have an equivalent of Usgard's
> READ_KEYPAD?  Or is that it?
>
> Clem wrote:
> >
> > No, use _getcsc haha... Now the newbies are really confused ;-)
> >
> > >No, that's the 85 equate.  You want to use _get_key (not _getky or
> > >_getkey!).
>
>



Follow-Ups: References: