Metaprogramming with sim41

Goal: This enhancement to SIM41 over HP41 allows metaprogramming.

Current Status: Experimental (2014/08/15)

IMPORTANT: With this feature a program could modify itself.

STOSTEP: Put a valid step in ALPHA and the number of step to be replaced in X. Execute STOSTEP. Then the step number X will be replaced with your new instruction.
Example: Write RCL 00 in ALPHA. Enter the number 4 in X . Execute STOSTEP.
Step 4 of the current program will be replaced with RCL 00.

RCLSTEP: Put a valid step number in X and execute RCLSTEP. The ALPHA register is replaced with the step located at position X.

Both STOSTEP and RCLSTEP are programmable (Could appear in a program).

Read about Metaprogramming in the Wikipedia.

Return to main page

Comments and questions welcome.

Alvaro Gerardo Suárez

© 2014