Files
MathApp/Core/Doc.txt
T
2026-09-09 13:41:49 -05:00

49 lines
1.3 KiB
Plaintext

:: Registers
Accumulator (A-Register)
X, Y registers
Memory (8kb)
:: Flags
Z; Zero
E; Is Equal
:: Helpers
NVAR <name>, <value>; Sets new a variable and its value
RVAR <name>; Removes a variable
SVAR <name>, <newval>; Sets a variables value
:: Commands (Memory)
LDA <address>; Loads a memory value into ram
STA <address>; Seeks to a memory value into the accumulator
LDX; Loads accumulator into X
LDY; Loads accumulator into Y
STX; Stores X into accumulator
STY; Stores Y into accumulator
SEA <value>; Sets accumulator
:: Commands (Arithmetic)
ADD; Adds X + Y then stores in Accumulator
SUB; Subtracts X - Y then stores in Accumulator
MUL; Multiplies X * Y then stores in Accumulator
DIV; Divides X / Y then stores in Accumulator
:: Commands (flow control)
JZE <pointer>; Jumps to a pointer in the program on zero flag
JNZE <pointer>; Jumps to a pointer if is not zero
JIE <pointer>; Jumps if is equal
JMP <pointer>; Jumps to a pointer in the program
SFG <flag>; Sets a flag to true
RFG <flag; Sets a flag to false
:: Extra shite
GIE; Gets if X is equal to Y
GIG; Gets if X is greater than Y
GIL; Gets if X is less than Y
GIGE; Gets if X is greater than or equal to Y
GILE; Gets if X is less than or equal to Y
:: Commands (Debug)
PRA; Prints accumulator
PRX; Prints X
PRY; Prints Y
PRM <address>; Prints value of memory address