On Sat, Apr 16, 2016 at 10:11:36PM -0400, Programmingkid wrote:
Mac OS 9 does alter the return stack in OpenBIOS. This is perceived to be unacceptable. The solution to this issue has been stated as implementing a second return stack. This stack would just be an array that implements push and pull calls.
In the bootinfo_load.c file, in the bootinfo_init_program() function is where the Mac OS 9 boot script is read into memory, into the bootscript variable. What I want to do is replace all >r and r> calls in the bootscript buffer with other words. Something like substitute>r and substitute_r>. These words would use a separate array to push and pop data from. I think this would work because Mac OS 9's boot script only uses the return stack for data storage. Does this sound like the right thing to do?
[ Please wrap your lines, this is unreadable. Thanks. ]
No; just implement a version of >R etc. that work in interpret mode. Like
: >r state @ IF postpone >r EXIT THEN ( and here, do the push to the simulated R stack ) ; IMMEDIATE
(And easier/cleaner/nicer if your system has separate compile and interpret behaviours for all words, or a separate compiler wordlist).
Segher