REVISED AS OF 24/MAR/2021 Each thread has 7 x 16-bit address banks virtual pointers are 8+16 bits. the high byte in a pointer is data for the VM fswwcbbb f = floatiness s = signedness w = width c = is this actually a 16-bit constant wearing funny glasses? b = bank instruction set is 8-bit, low instructions are in this order: (* works on floats) (' single argument) add* sub* mul* pow* div* mod* and or nand nor xor xnor eq* ne* gt* lt* ge* le* min* max* shr shl sr0f sl0f sr1f sl1f rtr rtl mirror' lb*' mov*' floor*' s?#f = shift [direction] [value] fill Support for fixed-point numbers can be implemented trivially using structured data and the mirror instruction some control calls that will be implemented are: - absjmp - 1 arg, expects pointer - can jump to different bank - jmp - 1 arg, expects offset - call - 1 arg, expects symbol - branch if equal - 3 arg, ptr, ptr, offset - branch if not equal - 1 arg, ptr, ptr, offset - memmove - 3 args, ptr, ptr, unsigned - open - path (string), 8 bit bank ptr - flush - path (string), 8 bit bank ptr - wait - ptr - spinlocks until the address specified has a 0 value - listen - ptr - spinlocks until the address specified has nonzero value - fork to - 16 bit signed - current VM is duplicated and the child immediately jmps - die - no args Schedualing is implementation defined, or should use naitive threads when emulated. I might start work on this tomorrow, I might start work on this several months from now, idk