Re: A89: On value


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

Re: A89: On value




Ben Rodgers wrote:

>
>Isn't there a numerical value for the on button?  There has to be a
>value for it.  It has a function that happens when you press it.  So
>there must be a value.  Could someone tell me what the value is if you
>know it?
>Thank you.
>==
>Visit my website, Some Assembly Required, at 
>http://meltingpot.fortunecity.com/gilford/908 
>
>
>_________________________________________________________
>DO YOU YAHOO!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>

There is no value for it.  Instead, you must read it directly from 
memory.  Here is a quote from IO Ports.txt:

     The [ON] key is special, and is not part of the matrix. (The normal 
keyboard
     memory mapping)

So in order to detect it, you have to options:

(1) Read it from memory directly (the previous byte of the regular 
keyboard memory mapped area):


:RW [60001A]
    <......1.|........> = ON key status (0=down, 1=up)
    <........|76543210> = keyboard column mask; if a bit is clear, one or
			: more keys in the corresponding column are being
			: held down. Keys in rows masked by [600018] are
			: ignored.

(2) Install your own auto-int vector:

0064 to 007F       Level 1-7 interrupt auto-vectors (25-31)

Auto-Int 6
----------
  Triggered when [ON] is pressed.


So you would insert the address for your routine at 0078.

The advantage of this method would be the ability to do any routine as 
soon as the on button is pressed.


Hope this helps.



-Mark Zavislak
felix@megsinet.net

| MOTOROLA:
68000 - life starts
68020 - its getting funny
68030 - Man, I'm pretty cool
68040 - Life's great
68060 - XTC
PowerPC - Call me GOD