Re: A82: 85->82 command


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

Re: A82: 85->82 command




read the 82-ports text file at ticalc.org (if there is one, i know
there is a 85-ports).  all you have to do is output (the out instr.) a
value to the keyboard port telling which keys you want to mask out
(hide).  then, when you input from the port (the in instr.) only
specific keys will be selected.  if a bit is low in the accumulator
after the instruction, that means that the key is being pressed.  here
is the code that i used for Solytare on the 82 (copy and pasted).  the
code to the Usgard routine should be similar to this:

   ld a,%00111110	;\
   out (P_KEYBOARD),a	; | status of arrow keys
   in a,(P_KEYBOARD)	;/  and top keys in a

then you would use it like this:

   bit 1,a                      ;LEFT pressed
   call z,MoveLeft
   bit 2,a                      ;RIGHT pressed
   call z,MoveRight
   bit 3,a                      ;UP pressed
   call z,MoveUp
   bit 0,a                      ;DOWN pressed
   call z,MoveDown
   

the value to use where i used 00111110 depends on what keys you want
to use.  again, check 82-ports.

-mike pearce

On Fri, 17 Apr 1998 19:01:55 -0400, you wrote:

>
>there isn't one because that's built into Usgard...
>
>I, uh, acquired the source to it, and out of respect for the author(s) of
>Usgard, WILL NOT post it here...  the routine in Mike P's Solytare (85)
>is similar, but not w/ the same results.
>
>The source will be sent personally, and I EXPECT YOU TO "CUT" IT OUT OF
>THE RELEASED SOURCE TO YOUR PROGRAM.  honor other people's work by doing
>so.... i needed the source to that routine for PJ, and that way was the
>most convenient.
>
>-Greg
>
>


References: