Skip to content

A CPU written in C so it can be ✨BLAZINGLY FAST✨

License

Notifications You must be signed in to change notification settings

voidwyrm-2/ccpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CCPU

A CPU written in C
It's assembler was going to be written in C, but C is hard so then I started writing it in Rust, but the borrow checker wants me dead so now it's written in Go
Or maybe I'll rewrite it in Zig

See architecture.md for, you know, the CPU architecture
See call_codes.md for the CPU call codes for syscalls

The casm/ folder is the assembler
cpu.c and lib.h is the CPU itself
The asm folder contains all the assembly I wrote for the CPU(.asm files contain plaintext source code, .bin files contain the assembled code)

Installation

NOTE: These instructions are meant for Unix systems
Installing Casm

  • Check if you have Go with go version

    If not, either download it with Homebrew(brew update && brew install go) or from Go's website

  • Run go install github.com/voidwyrm-2/ccpu/casm@latest; use casm -h for help with assembling files

Installing The CCPU
The CCPU must be built from source because I'm lazy and it's not that hard

  • Get a C compiler(I reccomend either gcc or clang)

    If you already have a C compiler that you like, use that one, I only care that you have one

  • Download this repo
  • Run compile cpu.c with -o ccpu; use ccpu -h for help with running files

About

A CPU written in C so it can be ✨BLAZINGLY FAST✨

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published