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 - EngineGames-Development/EASM

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
.vscode
.vscode
 
 
Website
Website
 
 
EASMHelper.py
EASMHelper.py
 
 
EasmIcon.ico
EasmIcon.ico
 
 
EasmThumbnailTransparent.png
EasmThumbnailTransparent.png
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
assembler.c
assembler.c
 
 
assembler.exe
assembler.exe
 
 
program.asm
program.asm
 
 
program.bin
program.bin
 
 
vm.c
vm.c
 
 
vm.exe
vm.exe
 
 

Repository files navigation

EASM

EASM is a small assembly-like programming language and simple virtual machine written in C.

I originally made this project to learn more about how assemblers, instructions and virtual machines work.

Status

Discontinued for now.

I am currently focusing on other projects and learning more about C, Assembly, computer architecture and systems programming. I may come back to EASM in the future.

How it works

EASM programs are assembled into a binary file. The VM then loads that file and executes the instructions.

EASM source
    ↓
 assembler
    ↓
program.bin
    ↓
    VM
    ↓
 execution

Example

SET R0 10
SET R1 20
ADD R0 R1
PRINT R0

This sets two registers, adds them together and prints the result.

Instructions

The current instruction set includes:

  • SET
  • ADD
  • SUBTRACT
  • MULTIPLICATE
  • DIVIDE
  • INCREMENT
  • DECREMENT
  • NEGATE
  • SWAP
  • PRINT
  • LABEL
  • JUMP
  • BREAK

There are currently four registers and support for integer and floating-point values.

VM

The virtual machine is written in C and executes the instructions generated by the assembler.

It currently handles:

  • registers
  • arithmetic
  • jumps
  • labels
  • integer/floating-point values
  • loading programs from program.bin

Building

You need a C compiler such as GCC or Clang.

gcc asm.c -o asm
gcc vm.c -o vm

Then assemble a program and run it with the VM.

Why I made it

This was one of my earlier projects for learning low-level programming.

I wanted to understand what happens between something that looks like assembly code and something that can actually be executed.

The project is pretty simple and has a lot of things that could be improved, but it was a useful starting point for learning about instruction sets, binary data and virtual machines.

Future

If I come back to the project, some things I would like to work on are:

  • better error handling
  • more instructions
  • stack support
  • functions
  • conditional jumps
  • memory
  • a debugger
  • a better binary format

EASM is mainly a learning project and is not intended to replace a real assembler or compiler.

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — 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.