[A83] Re: Interupts on TI-83 Plus
[Prev][Next][Index][Thread]
[A83] Re: Interupts on TI-83 Plus
It's easy enough to make the ROM think that the last key pressed was enter...
ld a,skEnter
ld (kbdScanCode),a ;I believe this is the symbol name...
That way you can use the keyboard port all you want and still ensure that the home screen doesn't misinterpret already held-down keys. If you disable interrupts before exiting, you're just asking for trouble.
In a message dated Mon, 30 Jul 2001 6:45:53 AM Eastern Daylight Time, "Tijl Coosemans" <tijlc@hotmail.com> writes:
>
> Use the romcall _getcsc to scan for enter, instead of direct input. Just
> bcall it and compare A with 9 to see if enter was pressed.
> (the halt is there to safe some battery power)
>
> loop:
> ...
> halt
> bcall(_getcsc)
> cp 9
> ret z
> jr loop
>
> Or, if you really want to use direct input then disable interrupts with DI.
>
> The problem is that when you use direct input not only you detect the key
> press but also the TI-OS. So, your program returns properly to the TI-OS,
> but the latter thinks enter has been pressed and not yet been handled,
> resulting in executing the last command, which is your program, like when
> your program would have returned good and you pressed enter again. If you
> used 2nd instead of enter, you would see that 2nd was set when your program
> returns.
>
> So, to handle a key press use _getcsc. Or, do use direct input and make sure
> the TI-OS can't scan for key presses by disabling interrupts.
>
> Tijl Coosemans
>
> ----- Original Message -----
> From: "Dale Watson" <merlin@cinternet.net>
> To: <assembly-83@lists.ticalc.org>
> Sent: Friday, July 27, 2001 4:35 PM
> Subject: [A83] Interupts on TI-83 Plus
>
>
> >
> > I am trying to write a program that will stop when you press the enter
> key.
> > The problem was that this would restart the program as soon as it gave
> > control to TI-OS. I tried to solve this problem by telling it to search
> for
> > the enter key being pressed and then released before giving control to
> > TI-OS. This didn't seem to do anything. I think it might be the
> interupts.
> > Does anyone know what all the interupts are on the TI-83 Plus?
> >
> > Scot
> >
> >
> >
> >
Follow-Ups: