Skip to content

vladris/pixie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pixie is a 16-bit word-addressable register VM with 7 registers, 16 op codes, and 128 KB of memory, with port-mapped I/O.

Dust is an assembler for the VM.

A program which counts down from 10, outputs numbers, then terminates:

# Countdown from 10
    mov r0 10
REPEAT:
    out r0 0
    sub r0 1
    jnz r0 :REPEAT
# Pixie terminates when PC is at 0xFFFF
    jnz 1 0xFFFF  

Assemble:

dust.py countdown.dust countdown.pixie

Run:

pixie countdown.pixie

Output:

10987654321

For a more complex example, check out the Brainfuck interpreter here.

This project serves no practical purposes (see Turing tarpit) and was not thoroughly tested. For more details, check out the wiki.

About

Minimal 16-bit toy VM and assembler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published