A86: Re: Simple Routine Help
[Prev][Next][Index][Thread]
A86: Re: Simple Routine Help
I haven't personally seen the difference, but Mardell or someone else said
you need at least a couple of NOP's in between the in and out (can't have
too much time, but at least a couple of cycles to give the hardware a chance
to respond). And besides what Jeremy said, if you are disabling interrupts
or writing your own handler, you need to do a <ld a,$ff \ out (1),a> to
reset the port in your main loop or int handler. If you don't, the calc
will give you phantom key presses (very strange).
> Hey All, this simple routine has been frustrating me for like a week
because
> it looks like it should work, could somebody look through it and help me
> figure out why it wont...? The routine first goes into a loop checking
all
> the keyports of Port 1, and seeing if they are not 255, noting that a key
has
> been pressed. I'm pretty sure that works fine (although the SCF may not be
> necessary), but the problem is in the next part. After it jumps out of
that
> first loop, B contains the current Keyport of the key that was pressed,
and A
> contains the Key Value of the key. I then load the Key Value into C,
continue
> to check A at the Keyport in B, and see how it compares to C. My purpose
in
> this part is that it should keep cycling in the second loop until that key
is
> Released. This is intended so that there wont be repeated functions
occuring
> later on if the key is held down. However, the routine will just not stop
and
> wait for it to be releasedt, and continues to exit after any key has been
> pressed. Can someone help me figure out why? Here's the routine...
Follow-Ups:
References: