The previous log The SIMPL Machine, looked at how the J1 Forth CPU simulation could be used as the basis of a cpu targeted to execute the SIMPL language.
Here are some notes regarding the implementation on the Teensy 4.0
A switch-case structure will translate the SIMPL ascii character commands into 16-bit instructions to feed the J1 cpu simulated cpu.
I took the SIMPL text interpreter framework and mapped into it the J1 instructions, focusing initially on the stack, ALU and memory operations – listed below
SIMPL Operation J1 hex code ” DUP 6081 ‘ DROP 6183 $ SWAP 6180 % OVER 6181 + ADD 6203 & AND 6303 | OR 6403 ^ XOR 6503 ~ INV 6600 @ FETCH 6C00 ! STORE 6123