elsevm

command module
v0.0.0-...-281e6c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 7 Imported by: 0

README

elsevm

A virtual machine implementation written in Go.

The main purpose was learning what is, how does it work and what could be done with a virtual machine by following the Write your Own Virtual Machine tutorial without copy-pasting the entire code, that's the reason why I used another language, Go instead of C.

Usage

Both 2048.obj and rogue.obj assembly programs are available.

In project's directory, compile:

go build

Run it, passing an assembly program as argument:

./elsevm 2048.obj
./elsevm rogue.obj

You can also run main file without compiling:

go run main.go 2048.obj
go run main.go rogue.obj

Feel free to test other assemblies.

Access the keyboard

Originally, termios.h was used in the tutorial to deal with input/output communication ports.

I have tried a similar behavior using bufio, a Go's standard library package. But I couldn't fix some bugs, which led me switching to eiannone keyboard library afterwards.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL