Friday, June 29, 2018

Gen 2 update: a look at the new assembler.

SBTCVM's assembler has been with it for a long time. Since the prototype era actually. Gen 2's ground-up rebuild of the VM also brings a similar treatment to good old SBTCVM tasm.

Syntax checks:

no less than 2 syntax check passes and 1 validation pass before writing to a trom file, along with a new trom format, ensure problems with corrupt roms are unheard of in Gen 2. saving coders time and energy.

simple numeric data tweaks:
first, decimal support has been added:

setreg1;10x32
setreg1;10x-12

second, ternary support has been overhauled:

two representations are supported:
+0-
p0n

Also, ternary values can be any arbitrary length from 1 to 9 trits.


Unified namespace:

the goto reference label, iobus address macro, and other namespaces accessed via '>' have been merged into a singular namespace, with custom variable support:

the v> prefix keyword supports all the numeric representations supported by most keywords:
v>myvar;10x1
They can even point to namespace entries to duplicate their value.
v>myvar2;>myvar

normal keywords can do this too:
setreg1;>myvar

dual data ahoy: 

Gen 2's new dual-packing concepts and the mirrored data/instruction size have been complimented by a new raw instruction:
raw;10x56,pn00pn'

They, of course, can be mixed numeric syntaxes.

Overall: 
This rock solid, modular, base of features will prove to be very useful in the coming months, as the Gen 2 instruction set and CPU development enter full swing.