Re: A86: Re: _vputs strikes again... again???


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

Re: A86: Re: _vputs strikes again... again???




In a message dated 11/23/99 15:45:41 Eastern Standard Time, 
croop@oregontrail.net writes:

> > Without seeing your code, I would guess that your interrupt handler is
>  > trashing some memory/register/flag while _vputs is running (though you'd 
> be
>  > very lucky to have the interrupt run at the exact time _vputs ran).  Did 
> you
>  > try setting the flag that forces alpha lock?  You could do that or use
>  > _get_key and not worry about key state.
>  
>  Unfortunately, my code is too large to put in an email without getting
>  alot of people mad, and the routines at fault would make no sense if I
>  took them out of context.
>  
>  xor a
>  ld (IY+shiftFlags), a
>  ret
>  
>  the above code is all that I install for my temporary int handler. 
>  Before installing, I copy the _alt_int_exec code (200 bytes) to a safe
>  location and preserve the original states of the checksum and the
>  control flag.  After I am done with key entry, I replace the original
>  code and checksum and flag state, totally erasing the int handler I
>  installed, and preserving any handler that was already there.
>  
>  Well, I used _getkey because I'm so used to using it, I guess.  Does
>  _get_key return codes that actually reflect the key that was pressed, or
>  the different things on each key? (i.e., '3', or '3', 'MEM', or whatever
>  letter is above the 3 key)  What really matters is, does _get_key
>  monitor keys for special combinations like 2nd+ON or 2nd+up/down? 

No, all it does is return the literal key that was pressed (exit, more, prgm, 
3, +, etc).  It totally ignores any shifts or alpha states that happen to be 
set.  And they can't turn the calc off unless you do it for them.  If they 
hit 2nd+on, you'll get the first time a 2nd and the second time probably 
nothing.  Note: _get_key uses K_MORE rather than kMore for the naming 
convention.

>  Afterall, the whole reason I used the interrupt handler in the first
>  place was to ensure that the calculator could not be turned off while
>  entering a series of keypresses.  Turning ALPHA off was even better, as
>  that made it impossible for the user to enter both a letter and a number
>  for the same key.  Can I detect the ALPHA and 2ND keys in _get_key? 
>  That would be nice.  (I can't test it right now, I'm on the wrong comp)
>  

_get_key is way better than _getkey for many many reasons.  First, as you 
were avoiding above, _getkey gives them the ability to turn the calc off, 
switch 2nd and alpha, etc.  Second, _getkey has apd which can royally screw 
up.  Third, sqrtKEY progs have a tendency to royally fuck up asm progs that 
use _getkey (any data in _asm_exec_ram is recopied so all changes are lost).  
Fourth, _get_key only checks without pausing, so you can do other things in 
the background (animate your own cursor, etc).

In any case, switch to _get_key, trash that unnecessary interrupt routine, 
and everything should be just peachy.



----
Jonah Cohen
<ComAsYuAre@aol.com>
http://linux.hypnotic.org/~jonah/