BitScope Virtual Machine

At the heart of every BitScope is a programmable virtual machine.

The virtual machine looks like a simple RISC CPU with a set of byte code instructions operating on a set of byte wide registers. Virtual machine programs (called scripts) are stored in the host but executed in the virtual machine byte-by-byte as they are received.

  • RISC style instruction set of 42 or more single byte instructions.
  • Instructions operate on a set of 46 or more single byte registers.
  • Execution is "live" via the communications port.
  • No programs need to be stored in BitScope memory.
  • Programs called scripts define the operation of BitScope.
  • All instruction execution is atomic which is very important.

A virtual machine design has a number of advantages.

  • Efficiency: each instruction may be highly optimized for performance. A general interpreter like BASIC can do anything - but in a very inefficient way. A virtual machine instruction is compact like assembly code, but may perform an extremely complex task.
  • Modularity: once a register set and basic command set are devised, extensions may be made by adding new instructions to enhance the machine. The original instructions remain the same.
  • Portability: changes to the physical machine (ie PIC) have little impact on the virtual machine design and the software that runs on the virtual machine.

Because they live in host memory, scripts are not limited to the memory in BitScope itself. The virtual machine design means you do not need to know PIC programming to program BitScope. You can think of the BitScope VM as a machine that implements a Little Language as summarized here. Consequently it is very easy to program BitScope.