Giter VIP home page Giter VIP logo

genesis's Introduction

Genesis

Minimal OS written in Jack.

Build

Tested on Ubuntu 20.04.

Clone the repository.

git clone https://github.com/abhaynayar/genesis

For the compilation, translation and assembling of Jack programs, you need Python.

For the CPU emulator, you need pygame.

Build and run the project using:

./run.sh

What the build script does:

  • Compiles the *.jack files in kernel/ and userland/ directories.
  • Copies the VM files to the build/ directory.
  • Translates the compiled VM code to Hack assembly. build/out.asm
  • Assembles the Hack assembly code to machine code. build/out.hack
  • Runs the machine code on the CPU emulator.

Docs

Todo

Applications

  • Text Editor.
    • SHIFT key support.
    • Fix backspace quirks.
    • Hold key for multi-input.
  • Chip8 Interpreter.
  • GUI Toolkit.

Language

  • For loops.
  • Hex numbers.
  • If-else ladders.
  • Shift operations.
  • Switch statements.
  • Declare variables anywhere.
  • Code coverage.
  • Error handling.
  • Inline assembly.
  • Coding style guide.
  • Modulo operator.
  • XOR operations.

System

  • File System.
  • C++ Emulator.
  • Sound Support.
  • Network Stack.
  • Timer Interrupts.
  • Shell Text Buffer.
  • Keyboard Interrupts.
  • Hardware-based CPU emulator. (n2t-wasm)

Misc.

  • Fonts with transparent backgrounds.
  • Terminate compiler and shell script on error.
  • Check if Hack file is 64-bit before emulating.
  • Print string and newline in the same function.
  • Check if pixel is already set, if yes then don't update.
  • Output multiple files from assembler; concat them in the build script.
  • Why does XOR only work with a space? => Was not added in JackType.symbols[].

genesis's People

Contributors

abhaynayar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

genesis's Issues

Question

So I want to help u with this project
Can u pls give me write access?
I'm really interested and I have many ideas with stuff like the fs io...

include statements

can you add support for #include "filepath" statements in the compiler? My brain is too tiny to do something like that :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.