The SIMPL Instruction Set - monsonite/SIMPL GitHub Wiki

The SIMPL Instruction Set builds upon the Txtzyme instructions, adding more instructions and program flow operators.

In general lower case characters a-z are used for calling functions or commands, consisting of one or more instructions.

a Assemble Invoke assembler mode
b Block load block number x from external RAM
c Compile compile block x
d Dump Generate a classic hexadecimal dump with 32 memory locations per line and ASCII contents in extra column on right hand side
e Edit edit block number x
f File load a file to external RAM
g Go Execute code from a given memory address
h High Set a port pin HIGH
i Input test the input pin state
j Jump perform a jump based on a conditional operator
k Count k is the loop counter – decremented each time around the loop
l Low Set a port pin LOW
m Milliseconds generate a delay of x milliseconds
n Number send a number x to a SPI port – or to the LCD display on Launchpad MSP430FR4133
o Output set an output pin high or low
p Print print the value of x as an integer
q Query
r Read read a sequence of blocks from external RAM
s sample read the adc channel
t Time put a timing mark each side of a block of code allowing microsecond duration to be calculated
u Microseconds generate a delay of x microseconds
v Variable
w Write write a sequence of blocks to external ram
x X reg direct access to X top of stack
y Y reg direct access to Y next on stack
z Snooze put the processor in low power mode for x milliseconds

The arithmetical and punctuation characters are used for lower level instructions – for example he arithmetical and logical group:

+ ADD
- SUB

  • MUL
    / DIV
    % MOD

& AND
| IOR
^ XOR
~ NOT

Conditional Tests

< LT
> GT
= EQ

There are then the memory operations – borrowed from Forth

@ Fetch
! Store

? List the dictionary of words
, Comma separate items within an array eg (1,2,3,4,5,6)

` (Tick) Start the millisecond interrupt timer

Instruction grouping – as per Txtzyme, plus new ones

string Print the characters enclosed between the underscore
" "
x{loop} The code between the braces is looped x times. If x= 1 the code within the loop is executed, if x=0 it is not executed.

[ 1,2,3,4,5] Define a comma separated array
(1,2,3,4) Switch/Case – the case is selected from the enclosed list
\text\ The text between the forward slashes is copied to external RAM

  1. convert number to ASCII
    $ convert number to HEX
    ‘a’ (Single Quotes) return the ASCII value of the enclosed character

: Begin a colon definition
; Close a colon definition (Compile it)

⚠️ **GitHub.com Fallback** ⚠️