0 Members and 2 Guests are viewing this topic.
Oh dear, recursive subroutines is going to destroy Portal I use r1-r6 as temp variables inside of my object code, so im going to have to make sure that i don't use those across subroutinesAs for all of the other features though, that sounds awesome EDIT: Another question, where are R1-R6 stored anyway? And how much can you recurse before bad things happen?
Builderboy, no need to panic, nothing is changing with the existing sub() command I am only adding a new command sub()r It only backs up the variables its using so if you call sub(SUB,A,B)r it will only save r1 and r2. In recursive subroutines, they are saved to the stack. The actual addresses of r1-r6 are in a really small free-ram area not part of L1-L6. You can get the actual location now with or1 if you want to pass them by reference or something.
HoMM: [==--------] Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :PtiDE: [----------] Explored and understood the main part of the code: just started writing a Tokenizer.