The source and repo for the CHIP-8 emulator is here:
chip8emu
To build you need the Spectre Programming Language toolchain:
spectre ./src/main.sx -o chip8emu
License: GPL-3.0-only - By Navid M
And the Spectre Programming Language:
spectrelang
/
spectre
Spectre programming language
Spectre
This repository contains the compiler for the Spectre Programming Language.
Spectre is a statically typed, design-by-contract language aiming to offer low-level control in combination with explicit correctness. The compiler is written entirely in Spectre itself.
The complete documentation can be found at https://spectre-docs.pages.dev
Installation
Prerequisite: cmake
Run the following in the terminal:
curl https://spectrelang.org/get.sh | sh
Then run to confirm installation:
spectre -v
The compiler is tested under MacOS aarch64 and Linux x86_64, for Windows it is untested, though might work under MSYS2.
Examples
val std = use("std")
pub fn main() void! = {
val xs = ["hello", "world", "this", "is", "a", "test"]
for x in xs {
std.stdio.print("{s}\n", {x})
}
}
Another example, with a simple demonstration of the trust system and pre/postconditions:
val std = use("std")
type Stack = {
data: mut list[i32]
len: mut usize
}
pub fn (Stack) push(s: mut self, vl: i32) void =…
Top comments (0)