GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jaaron/toy-bytecode: A toy bytecode VM, assembler, and self-hosting compiler for a scheme-like high-level language.

BranchesTags
Open more actions menu

Latest commit

 

History

112 Commits
112 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README
README
 
 
assembler.l
assembler.l
 
 
assembler.sch
assembler.sch
 
 
factorial.sch
factorial.sch
 
 
interpreter.c
interpreter.c
 
 
interpreter.h
interpreter.h
 
 
lib.sch
lib.sch
 
 
peephole.sch
peephole.sch
 
 
schemer.sch
schemer.sch
 
 
stringtest.sch
stringtest.sch
 
 

Repository files navigation

This project implements a simple bytecode virtual machine, assembler,
and self-hosting compiler for a scheme-like high-level langauge. It is
intended as a vehicle for playing with ideas in bytecode interpreting
and compilation.  It is not intended for any sort of real or
production use.  

To build the project,  simply type 
    $ make

You will need gcc installed as well as GNU guile, a scheme
implementation used to bootstrap the compiler.  

This will build the following products:

    interpreter:       the standard bytecode interpreter.

    trace_interpreter: a version of the bytecode interpreter that
   		       prints a log describing the machine state as
     		       each instruction is executed

    assembler:         the assembler for building executable bytecode
    		       files from bytecode assembly files.
 
    schemer.bytecode:  the scheme-like language compiler, built from
    		       its own image, that can be run using the
    		       interpreter.
    
A bytecode program can be run using either the regular or tracing
interpreter as:
    $ ./[trace-]interpreter program.bytecode

To use the compiler, a source program should be directed into the
interpreter's standard input, the bytecode assembly will be written to
standard output:

    $ ./interpreter schemer.bytecode < program.sch > program.asm

To assemble the compiled program into executable bytecode, send it as
input to the assembler command:

    $ ./assembler <program.asm >program.bytecode

Note: The interpreter does not provide any standard-error like output
stream, so the compiler will write its error messages to standard-out
which will confuse the assembler and lead to bizarre error messages.

About

A toy bytecode VM, assembler, and self-hosting compiler for a scheme-like high-level language.

Resources

Readme
GPL-3.0 license
Activity

Stars

17 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.