Is there a way to explicitly push/pop data to the C return stack? (Ideally in standard C, but a GCC-only solution would be ok too.)
I'm implementing a Forth in C, on a microcontroller that's very tight on RAM (kbytes, not Mbytes).
I'm allocating RAM for the data stack, but I'm hoping to save some RAM by sharing the Forth return stack with the C return stack, via explicit push/pops.
Can this be done in C?
GCC has a __builtin_return_address
function, that's probably the closest you'll get.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With