Added branching and direct data transfer , Fixed Stability Issues
Added .if and .fi statements
Added conditional operands precedes , exceeds , equ , neq
Format :
.if var1 operator var2
...
...
.fi
Operators
precedes : x precedes y directly corresponds to x is smaller/less than y
.exceeds : x exceeds y directly corresponds to x is greater/more than y
equ : x equ y , directly represents x equals to y
neq : x neq y , directly corresponds to x does not equal to y
Operands
Both var1 and var2 are defined symbols/variables defined using .define , using immediate operands like .if var1 equ 23 will not work as 23 will be interpret as a variable name.
Nesting
While nesting is supported , its limited to a Sequential Evaluation Architecture. Or a Multiple Checks Single Exit model. Since Micro Symbolic Script does not support complex logical operators like the && , || , ! operators in C/C++ , nested logical evaluation is used.
EXAMPLE :
.define val1
.define val2
.define val3
.assign val1 200
.assign val2 220
.assign val3 100
.if val1 neq val2
.if val3 precedes val2
.if val2 exceeds val1
.print val1 &d
.fi
exit
The above program nests logic using sequential evaluation (similar to the && operator in C) where if any one of the conditions fail , the program flow is branched to the .fi , while you can add a .fi for all .if statements , it is not recommended as only the first entered .fi will be considered. ,fi is a heavy command which does alot of background work so you don't want to overuse it in an 80 Byte Limited Program Space.
The .if command actively works on the local_conditional_stack of Micro Virtual - R , when .if is used , before evaluating conditions , it will calculate the address of the .fi command.
The .fi command automatically inserts a 4 byte checksum of FIBYTECODE 1EH 1EH E1H E1H sequentially to prevent collisions with generic data and other bytecodes. Hence , it is a heavy command only intended to be used once in an if block.
The if statement evaluates the conditions and jumps to the .fi block if any of the conditions fail.
The two byte array stores the condition result and the jump address so the total memory used for a nested if statement becomes only 2 Bytes
The
Various examples of using .if and .fi with the .load and .move operations too.
The .load and .move operations are very simple, .move moves the primary accumulator , the secondary accumulator or a variable into the primary or secondary accumulator while .load loads a 16 Bit Value in the primary accumulator
WILL BE ADDED ON 18th May 2026