Parser Hook
Posted at Saturday, May 31st, 2008 12:46AM by bfr

Could somebody explain how to set up and use a parser hook?

Right now, the routine I'm using to enable my parser hook in my Flash Application is:

enableHook:
xor a
ld hl,hook
bcall($5026)
ret

(The hook is on page 0 and according to WikiTI, $5026 is the address to enable the parser hook: http://wikiti.denglend.net/index.php?title=83Plus:BCALLs:5026)

The code for my hook right now is:

hook:
.db 83h
bcall(_ClrLCDFull)
ret

I know this doesn't really check to see the results of the hook and whether or not it's a certain token, but it should still work, right? Right now, it doesn't appear to have any effect when I enter in some tokens and stuff in the home screen and then press ENTER.

(In the future, I might want to find out how to intercept something like tMax or tfnInt)


re:Parser Hook
Posted at Saturday, June 7th, 2008 1:24PM by bfr

OK, thanks.

However, I have another issue now. I'm trying to find what values of the registers a, b, and c I need to detect the fnInt token. I made a program as you suggested before that only contains fnInt, and by setting a breakpoint at my hook, I'd be able to get the values of a/b/c.

The hook only seems to be called once, though - right after entering prgmA on the home screen. I tried adding some other tokens besides fnInt in my program, like sin, but the hook only was executed once. I'm not doing any detection right now for fnInt, by the way, so my hook should be called when other tokens like sin are called. Any ideas? Thanks!


re:Parser Hook
Posted at Sunday, June 8th, 2008 12:41AM by bfr

OK, thanks for the help. I used the Flash Debugger (version 1.0 build 29), it's a TI-83+ OS version 1.16.

Actually, I remember using 24h like a week ago or something when I first was trying to get this to work. I not only got it from http://wikiti.denglend.net/index.php?title=83Plus:OS:ti83plus.inc (searching for tFnInt), but I remember loading the values of registers into HL, bcalling _DispHL, and getting 24h (after I converted _DispHL's decimal output to hexadecimal, of course). It's just that my fnInt-detection wasn't working before not because it was checking the wrong for the wrong value of b, but of a. I'm not sure why I got the wrong value of a when doing my _DispHL test, though...I just did the _DispHL test again and got a's value to be 1 (using basically the exact same code as before, except for now my hook has been copied into appBackUpScreen). I wasn't completely sure that 24h was correct before, though, because first of all, I didn't really know what I was doing, and secondly, I remember some note in WikiTI saying that the values given there might not always work for some reason.

What kind of confused me though is that when using the debugger, I got...the following values for a and b: http://img525.imageshack.us/img525/7586/debuggggvs7.png (the screen is inverted because my hook previously set the text inverse flag).


re:Parser Hook
Posted at Sunday, June 8th, 2008 3:01PM by bfr

OK. It's just that my hook (or the breakpoint I set, at least) ran only once, and that was when A was 0.


re:Parser Hook
Posted at Friday, July 11th, 2008 5:13PM by TheStorm

so wait you can change the way certain vars are parsed? That would make one of the the things I was trying to do on the 86 a lot easier.


reply

You must be logged in to post replies.