Skip to content

ifdiego/elsevm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An LC-3 virtual machine.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages