Bytecode executor
FredBlais
Posts: 379
In the Propeller 2 datasheet, there is mention of 6-clock custom-bytecode executor for interpreted languages. Is there any documentation about that?
Comments
You have to search for XBYTE.
Page 24 here: https://docs.google.com/document/d/1gn6oaT5Ib7CytvlZHacmrSbVBJsD9t_-kmvjd7nUR6o/edit?_ga=2.240644547.1936649111.1663502886-1785724881.1639682292&pli=1&tab=t.0#heading=h.n6kli7pxhgww
Page 29 here: https://docs.google.com/document/d/1BuU96MnMkI0Ha1gjmtUlZPCcbGffNyZEp_1ONjLC7Vs/edit?pli=1&tab=t.0#heading=h.1ci93xb
Here: https://p2docs.github.io/xbyte.html
Some examples of bytecode executors using XBYTE:
The canonical example, Chip's Spin2 bytecode interpreter. Fairly complicated, but it's from the master himself:
https://github.com/parallaxinc/P2_PNut_Public/blob/master/Spin2_interpreter.spin2
A really simple example: https://github.com/totalspectrum/p2-jit-tools/blob/master/sample_xbyte.spin2
A somewhat less simple but more realistic example: https://github.com/totalspectrum/zog/blob/master/zog_p2.spin
The last two probably need flexspin to compile.
I need to get my head around all the different P2 manuals!