Question about the SPIN2 interpreter
Hi,
this is about Chip's interpreter, discussed here: https://forums.parallax.com/discussion/171196/pnut-spin2-latest-version-v55-improved-bytecode-efficiency-for-reading-writing-bitfields/p77
and found here: https://github.com/parallaxinc/P2_PNut_Public/blob/master/Spin2_interpreter.spin2
I am trying to get some understanding, how this works.
There is some "trap_flag" mentioned. Can someone enlighten me, what that means or is?
Thank you!
Christof

Comments
I am not sure what that is about. Was it maybe my note at the top of the source code to add stack-size tracking?
Or maybe it was about trapping abort commands?
The Interpreter picks up successive bytecodes and executes your compiled program. That's its job. Of course, there are also branches and calls, etc.
I have tried to make the bytecode very functionally dense. The Interpreter is very dense, too, with all of the skip patterns.