[A86] Re: Rom versions & key port


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

[A86] Re: Rom versions & key port



Leif Åstrand writes:
> _vputs ($3ae8 with rom version 1.6)
> _getkey ($3e4e)

Do not depend on them being the same across ROM pages.

> _cphlde ($0107)

If this routine is speed critical to your program, then include it locally:

 push hl
 or a
 sbc hl,de
 pop hl
 ret

There is a faster version, but it destroys the A register:

 ld a,h
 cp d
 ret nz
 ld a,l
 cp e
 ret

> When leaving a program reading keypresses with ports the last pressed
> key is also detected by the shell, can anything be done to avoid
> this?

The easiest solution is to not exit until the key is released.

--
David Phillips <david@acz.org>
http://david.acz.org/




Follow-Ups: References: