Plain Assembly – Data types

The VM is designed to control logic so everything is mapped into a 32 bit virtual register for simplicity. The assembly language support a large range of data types, but the VM will by default treat everything as a 32 bit register to keep it simple and fast.

The assembly language do however support a range of data-types:

Bit A single bit data-type that can be used to create bit-fields. Used in math it is treated as an unsigned integer.
Byte A byte is 8 bits.
Uint16 An unsigned 16 bit integer.
Int16 A signed 16 bit integer.
Uint32 An unsigned 32 bit integer.
Int32 A signed 32 bit integer.
Float32 A 32 bit floating point.
String A text string.
bool A boolean value that can be true or false.
Object Data structure used to create data-types based on existing data-types.
Enum A data-type that only allow a of constant values.

Arrays are supported for all data-types by adding [] after the variable name. Operations can use ranges as a[0..9].

Adding “packed” to a Object will force it to be bit-packed. This is designed to allow the VM to encode/decode bit-packed Messages etc.

As for other data-types we could also support double64, uint64 etc.

Leave a Reply

Your email address will not be published. Required fields are marked *