[TI ASM] interrupt disapearing after BASIC prog

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

Post Reply
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

[TI ASM] interrupt disapearing after BASIC prog

Post by King Harold »

I made a little program that displays my name at the bottom of the screen whilst in the homescreen, and ONLY there, well - cool, but sometimes during a BASIC program that does:

Code: Select all

0->X
Repeat 0
Disp X
X+1->X
End
It disappeared. Well actually it was still there, but the calc switched to IM 1.
Why does it do that?!

Edit: in fact every BASIC prog seems to do this
LolBbq
New Member
Posts: 20
Joined: Thu 23 Nov, 2006 3:01 pm

Post by LolBbq »

I think TI-BASIC requires the calc's interrupts and only the calc's interrupts to run correctly. Many menus and functions of the TI-OS are inaccessible when you run IM 2, for example, when I run my own TSR, and then try to graph something, it gives me an ERR:SYNTAX or something and then destroys the TSR and switches back to IM 1.
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

That is strange though isn't it.. Not to mention annoying
LolBbq
New Member
Posts: 20
Joined: Thu 23 Nov, 2006 3:01 pm

Post by LolBbq »

It sort of makes TSRs not worth programming... :(
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

There has got to be a way to make them stay though
(What about a call to your program at $0038?)

Edit: oh, no, ROM page 0 is always mapped to $0000..
LolBbq
New Member
Posts: 20
Joined: Thu 23 Nov, 2006 3:01 pm

Post by LolBbq »

You mean rewrite the code at $0038 so that when it runs in IM 1 it calls whatever you want to? It's a bit impractical, since TI as pretty much stuffed that area full of code and there's no saferam there.
User avatar
Dwedit
Maxcoderz Staff
Posts: 579
Joined: Wed 15 Dec, 2004 6:06 am
Location: Chicago!
Contact:

Post by Dwedit »

Maybe use a key hook instead of interrupts. If you hook into the part where it scans the keyboard (I think it's getKeyHookPtr), you can get effects like an interrupt, but no TIOS interrupting it.
You know your hexadecimal output routine is broken when it displays the character 'G'.
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

It doesn't run at a constant time, but I could use that to re-install the interrupt ;)

@LolBbq: one could replace jr $006A \ in a,(4) by call Label \ nop, then have the code at $006A in your interrupt, end with in a,(4) and then jp to $003C
BUT it's ROM so we can't do that.. And you can't even map an other page to it..
Post Reply