0 Members and 4 Guests are viewing this topic.
I've always wondered: Wouldn't the method Runer described cause a memory leak in the stack because everything wasn't poped off the stack before placing the return address on the stack?
What about Basic's Stop? How does that work?
Quote from: ztrumpet on April 10, 2011, 01:42:10 pmI've always wondered: Wouldn't the method Runer described cause a memory leak in the stack because everything wasn't poped off the stack before placing the return address on the stack?Nope, there'll be junk data where the stack used to extend, but it gets overwritten anyway, so it doesn't really matter.
Quote from: Freyaday on April 10, 2011, 01:42:52 pmWhat about Basic's Stop? How does that work?Well, I believe mostly the same way. But considering that BASIC is parsed, I would think that the parser handles all of that for you.
In other news, Frey continues kicking unprecedented levels of ass.
I've decided to try to incorporate Axe into zStart. But since Axe is constantly being changed, I can't statically link to addresses within it.So my request is a call table that's at a static location that outside programs can call. The only two calls I can see needing though are:-Compile OP1-Set Axe HooksI want the Compile OP1 so I can make a button that compiles an Axe program. Preferably, have it display everything it normally does when compiling a program, and then just return. With enough hacking, this might even allow for an on-computer compiler.And the set axe hooks would be so that even after ram clears, you have Axe's token set.
Quote from: Freyaday on April 10, 2011, 01:12:31 pmA way to Exit the program from within a subroutine, because both Return and goto end-of-program just end the subroutine.There's no real command to do that in ASM either. In fact, you could think of the program itself as a big subroutine that calls smaller subroutines. There's are JForce bcalls in ASM, but they leave an extra copy of the program in RAM, causing a memory leak.
A way to Exit the program from within a subroutine, because both Return and goto end-of-program just end the subroutine.
pop hlld (returnAddress), hl
ld hl, (returnAddress)jp (hl)
Lbl EXTπ -> AReturn