A83: Re: Re: Getkey + 2nd + on
[Prev][Next][Index][Thread]
A83: Re: Re: Getkey + 2nd + on
It sort of depends on what calculator you're talking about...I'm giving
examples on the TI-83 Plus, since you didn't mention which one you were
using.
Disabling APD is easy, just B_CALL DisableAPD (or reset the apdEnabled
flag).
Disabling 2nd+Off in GetKey is a touch harder. If you're programming for
MirageOS, all you need to do is run this code at the beginning of your
program:
ld a,10
call setupint
...MirageOS will handle everything from there. If you're programming for
Ion, or something else, you need to set up an interrupt yourself to do the
task. I suggest you look at some tutorial code or source code that uses
interrupts to learn how to set them up properly, but what you need to do in
the actual interrupt is:
1) Check if the on key is being pressed (if bit 3 of port 4 is reset, the on
key is pressed)
2) If it is pressed, reset the 2ndpressed flag.
3) Jump to the TIOS interrupt.
Hope this helps,
-Dan Englender
----- Original Message -----
From: "Henk Poley" <HPoley@DDS.nl>
To: <assembly-83@lists.ticalc.org>
Sent: Sunday, January 28, 2001 11:44 AM
Subject: A83: Re: Getkey + 2nd + on
>
> How can I stop my program quitting if 2nd and on are pressed during the
> execution of getkey? I would also like apd to keep working. I've tried
to
> find the answer to this question at ticalc but failed. All I found is the
> question itself, not the answer. I hope that it is possible and would
like
> to thank anybody that replies.
> -----
>
> if you are talking about "BASIC getkey" , then search for a program on
> TiCalc called "BASIC shell" (or something), it disables the 2ND+[ON]
> interupt.
>
> The answer for an assembly program, is to not use _getkey, use one of
> the other keyboard-value-returning-routines, like _GetK etc.
>
> Take a look at the "Ti-83 ROMcall reference" (found at TiCalc), and search
> for 'key' or 'get'... Most of them are already described.
>
> APD'ing should be done via a "selfmade" counter in the mainloop or
> somewhere. An interupt can also do the job, you only to be a bit more
> creative to fix that...
>
> Henk Poley
>
>
> BTW: this is not a BASIC mailing list
>
>
>
References: