I'm trying to write a program that utilizes the parser hook that DoorCS 7 does, but I would like to chain with DoorsCS7. So, @KermMartian...What code do I need to use in order to make a hook chain with DCS7.

Secondly, rather than actually try to place the entire hook in some RAM location, can I, as the hook itself do a 'bcall(_ChkFindSym)' of the program containing the code to execute if the hook triggers, then add to 'de' the distance from the program start to the place where the code to execute should start, then jp to de (effectively jumping into the program). Would that cause issues? If so, what other options do I have?
You need the latest, post-7.2 beta 2 beta, which is going to get canonized as Doors CS 7.2 beta 3 in the near future. This new beta properly chains Doors CS with existing hooks; you simply set your hook, let Doors CS create its own hooks, and your hook will be automatically chained.
Ok. How about my second paragraph? Is that ok to do?
ACagliano wrote:
Ok. How about my second paragraph? Is that ok to do?
Yes, that is OK to do, but awfully slow if the hook will be executing that code often. Why don't you just have the meat of the code in the hook itself? The hook body should really be in Flash inside an App anyway; it's iffy to put it in RAM in case the RAM where you stick it gets overwritten.
Well, what my hook is designed to do is symbol interpretation...and I'd rather not write a flash app. First, the hook will trigger and detect if a certain string is in the input...if not, it returns right away. If it is, then we jump into the program...

Now, assuming I use the homescreen parser hook, where will the input expression be, in memory, so that I can load it into the program? And also, where should I exit to if the hook should return control to the OS without doing anything?
bump on previous question: how do I use the expression that typed before the hook triggered? where is it in memory?

Edit: I think this should be released as an app. So...How would I perform the same jump as I wanted to do into a program, but to instead jump into the app.
All the docs available on the Homescreen hook can be found here : http://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9B8C .
I think

2: An expression was entered to be evaluated.
OP1 contains prgm!.
To retreive the expression to be evaluated use prgm#.
Return NZ to cancel running the program.


ld a,2
ld Op1, 'prgm#'  ; yeah i know i have to do the rst 20h - that's just psuedocode

That can't be right??

PS: This thread and http://www.cemetech.net/forum/viewtopic.php?p=196693#196693 are associated.
Just access prgm# and retrieve its content. I think that the content is actually the expression to be evaluated.

 ld a,2 ; dunno why you added that ^^
 ld OP1,"prgm#"
 bcall _chkFindSym

 ld hl,statVars
 ld a,(de)
 or a
 jr z,exitLoop
 ld (hl),a
 inc hl
 inc de
 jr loop
Something like that.
So, I'm assuming that copies the input expression into statVars? And, to put that into ix (which is my choice as a pointer to the expression in the program, I can then do

ld  ix, statVars

right before the routines that use ix, correct?
Yeah, just use that.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum