A stack based virtual machine learning project
Go to file
sloum 55715ba55e Makes things work better (worst commit message ever) 2024-01-03 22:35:18 -08:00
.gitignore Adds gitignore 2023-12-29 23:02:26 -08:00
README.md Makes things work better (worst commit message ever) 2024-01-03 22:35:18 -08:00
design.md Moves program into its own memory space and fills in all but one of the rest of the ops 2023-12-30 20:46:26 -08:00
go.mod Initial commit 2023-12-29 23:01:38 -08:00
go.sum Initial commit 2023-12-29 23:01:38 -08:00
helpers.go Makes things work better (worst commit message ever) 2024-01-03 22:35:18 -08:00
main.go Makes things work better (worst commit message ever) 2024-01-03 22:35:18 -08:00
ops.go Makes things work better (worst commit message ever) 2024-01-03 22:35:18 -08:00
scratchpad.txt Initial commit 2023-12-29 23:01:38 -08:00
stack.go Initial commit 2023-12-29 23:01:38 -08:00
types.go Adds ALL op back in (allocate) 2024-01-02 16:12:44 -08:00

README.md

bird, a vm

bird-vm is a mostly stack based vm. It uses 8-bit ops and 8-bit stacks, but has 16-bit addressing and the ability to do 16 bit math and work with the stacks in "long mode" (pop a high and low byte to work with 16-bit numbers).

This is a learning project. Many mistakes are being made, but lots of fun is being had. It is inspired by varvara/uxn, but without looking at their implementation details and mostly just taking my memory of their project as a point of inspiration. I do not expect it to be generally useful, or a particularly good design (it is my first time dipping a toe into writing a bytecode interpreter/vm).

Coming soon:

  • An assembler that produces bird bytecode (see: bird-asm )
  • A few string handling ops that will make working with null terminated strings more functional
  • A higher level language that compiles down to either the assembler or to bytecode
    • I am thinking about something vaguely Pascal-like