Re: A86: simple code I can't figure out
[Prev][Next][Index][Thread]
Re: A86: simple code I can't figure out
Yeah, I had a routine in YAS that looks like that, it just would've been
nice to replace it with a rom call... Usgard (as well as Ash) has it
listed as a rom call.
David Phillips wrote:
>
> _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
References: