Multi tasker app using interupts and parserhook

Got a brilliant program idea? Let us know!

Moderator: MaxCoderz Staff

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

Multi tasker app using interupts and parserhook

Post by King Harold »

Someone should make a multi tasker app that switches tasks like every nth interupt wich a parserhook that intercepts BASIC prog-commands with maybe even a priority function to make one prog get 90% and the other 8% (2% is just a guess but you have to lose some CPU to the switching)

great for ppl that want to run background programs for whatever reason
it would also enable ppl to "hack" basic games, they could anyway, but with this app they could do it at runtime and use BASIC programs as "trainer", if a background prog contains something like this:

Repeat 0
If X<1000
10000->X
End

(X being the amount of money or HP or arrows/bullits whatever)

it shouldnt be hard to make, and probebly single-page


does that sound like a good idea? (i cant do it myself though, i just started to learn asm) oh and it should be fully legal, i mean, changing variables isnt a crime is it? its not like editing code and saying you made your own game..

as an afterthought: dont forget to save all basic vars to an appvar or something before switching tasks, and safe all repeat,while,for, the search thing for the Goto statement, and the program Return returns to (does that use pointer to mem or store something in some other thing and use some sort of bcall?)
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Im not sure that i fully understand your idea? You want to run a parser hook every n times whilst a BASIC program is executing?
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

Then it wouldn't be a parser hook so much as... an interrupt hook?
Image
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Well you could classify hooks as "software event interrupts" i guess :).

I gave it a little thought and i guess you could make a BASIC trainer. However im not sure that a parser hook would be the correct option for such a thing. I guess its safer than an interrupt, but if you're only patching TIOS variables, you would most likely discard parsing anything every time.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
Dwedit
Maxcoderz Staff
Posts: 579
Joined: Wed 15 Dec, 2004 6:06 am
Location: Chicago!
Contact:

Post by Dwedit »

I think a TI-Basic trainer is completely pointless, since you can just edit the code anyway.
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 »

yes you can, but i bet there are atleast 2000 noobs somewhere (probebly on ticalc.org) that would like the idea..
and it seems like nice challange to make a multi tasker anyway..
but if you make it for asm it will be terribly hard to make it so that it is also safe and doesnt crash at random and you'd probebly have a very large stack
but anyway, i didnt see a multi tasker anywhere, i might be wrong but i think it doesnt exist yet, so someone should make it..

oh and im calling it a parserhook since there should atleast be some sort of parserhook to switch only while something it being parsed (wouldnt want to be switching to a NULL pointer and.. well what would happen anyway?)
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

The only thing is, things are passed at variable intervals ... plus what you are parsing would be completely irrelivant since you will be patching TIOS variables and not working with whatever is currently being parsed. Its not much of a problem i guess, but you will have to patch the variables every time the useless hook is executed.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

hmm.. it seems like a good idea though, somehow..
chickendude
Extreme Poster
Posts: 340
Joined: Fri 07 Jul, 2006 2:39 pm

Post by chickendude »

Why not, instead, write an application that has a tutorial on how to open and edit a BASIC program?
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

no no its not directly about changing basic values its about multi tasking i just didnt think of a good example
chickendude
Extreme Poster
Posts: 340
Joined: Fri 07 Jul, 2006 2:39 pm

Post by chickendude »

So you want to be able to, say, display the text for the intro to a game while loading/setting up a tilemap in the background?
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

or run a neural network while innocently displaying a simple game. :twisted:

seriously, someone needs to make a neural network for a calculator game. It would be so cool. chickendude, are you up for it?
In Memory of the Maxcoderz Trophy Image
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

chickendude wrote:So you want to be able to, say, display the text for the intro to a game while loading/setting up a tilemap in the background?
yea thats a better example (or decompressing or something)
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Such things can be achieved without the need for interrupts or hooks, just depends on engine design.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
chickendude
Extreme Poster
Posts: 340
Joined: Fri 07 Jul, 2006 2:39 pm

Post by chickendude »

@compwiz: I'll definitely give it a whirl! And with the way I have saved games set up, I could easily use that to store valuable data about the user (and change it from saved games to user profiles and such). Or maybe I could use this app to act as a sort of spyware device to watch over EVERYTHING the user does!
Post Reply