RISCAL is a 32-bit reduced instruction-set computer (RISC) designed for learning and research purposes. It is named after my dog, Rascal.

Overview

RISCAL CPU

RISCAL is a 32-bit custom instruction set architecture virtual machine. It is intended to be used for learning/research purposes. In a nutshell, so far:

  • 32-bit, fixed-length instruction set
  • 16 General-purpose registers
  • FLAGS, stack pointer
  • 65536 words of program memory (262144 bytes)
  • Ability to set up and leverage a return stack to retrieve data after RISCAL exits

Assembling for RISCAL

The easiest way to get starting programming RISCAL is to grab a copy of customasm. This repo contains the custom instruction set definition in the examples directory, in the file riscal.asm to get you started, as well as a small loop test program.

Debugging RISCAL

As it stands RISCAL does not have a formal debugger. You can set a debugging flag, however, in the debugger.hpp file:

#ifndef DBG_HPP
#define DBG_HPP

#define DEBUG

#endif

This will print to stdout all registers for each operation that the VM performs.

You might also like...
🛠️ A simple ECS library made for learning purposes (header-only)

Met ECS A simple Entity Component System library made for learning purposes. It is header-only, so just have to copy the content of the src folder and

Simple, single-file fluid solvers for learning purposes
Simple, single-file fluid solvers for learning purposes

Incremental fluids The purpose of this project is to provide simple, easy to understand fluid solver implementations in C++, together with code docume

The Intel 8080 (
The Intel 8080 ("eighty-eighty") is the second 8-bit microprocessor designed and manufactured by Intel.

i8080(Intel 8080) The Intel 8080 ("eighty-eighty") is the second 8-bit microprocessor designed and manufactured by Intel. It first appeared in April 1

Ben Eater's 8 bit breadboard computer emulator in C++
Ben Eater's 8 bit breadboard computer emulator in C++

TinyE8 - Ben Eater's 8 Bit CPU Emulator TinyE8 emulates Ben Eater's 8 bit breadboard CPU. Implemented all the Instructions except JC and JZ, I need to

Ben Eater's 8 bit breadboard computer emulator written in C.
Ben Eater's 8 bit breadboard computer emulator written in C.

Ben Eater's 8 bit computer emulator This is complete ben eater's 8 bit breadboard computer emulator written in C. Featerus Ncurses graphics Assembler

A program for converting instructions from Ben Eater's 8 Bit computer design to binary.
A program for converting instructions from Ben Eater's 8 Bit computer design to binary.

8Bit-Assembler A program for converting instructions from Ben Eater's 8 Bit computer design to binary. We used C because is used for it's mid-level-ne

Taskbar Labeler is a PoC/research/learning project.
Taskbar Labeler is a PoC/research/learning project.

Taskbar Labeler Taskbar Labeler is a PoC/research/learning project. It replaces the rendering of certain icons on the taskbar with a colored rectangle

Some source code to demonstrate avoiding certain direct syscall detections by locating and JMPing to a legitimate syscall instruction within NTDLL.

hiding-your-syscalls What is this? This repository contains all of the source code from my blog post about avoiding direct syscall detections, which y

Releases(v1.0.0)
Owner
elk fan
null
A simple-to-build ortholinear keyboard named after a famous penguin

Nils Olav A simple-to-build, low-profile, ortholinear keyboard named after a famous penguin. This keyboard is based around the Elite-C v4. It features

Andrew Harvie 9 May 27, 2022
PLP Project Programming Language | Programming for projects and computer science and research on computer and programming.

PLPv2b PLP Project Programming Language Programming Language for projects and computer science and research on computer and programming. What is PLP L

PLP Language 5 Aug 20, 2022
WIP: ESP32 powered robot dog, quadruped robot. This is just code, hardware in the other repositories

Small Robot dog (quadruped) Hardware ESP32 IMU (not implemented) 12 servos TowerPro mg90d (hope it will work) Two 18650 Software Arduino IDE compatibl

Gleb Devyatkin 74 Dec 22, 2022
Small program using GMP to convert a decimal number (1.8) into a reduced fraction (9/5)

gmp_rationalize This is a small program to convert a decimal number (like 1.8) into a reduced fraction (like 9/5), using GMP for handling arbitrary-pr

null 3 Apr 5, 2022
TiEtwAgent - PoC memory injection detection agent based on ETW, for offensive and defensive research purposes

TiEtwAgent - ETW-based process injection detection This project was created to research, build and test different memory injection detection use cases

Filip Olszak 187 Dec 20, 2022
TinyDBR is meant for tiny dynamic binary rewriter fox x86 instruction set

TinyDBR What is TinyDBR? TinyDBR is meant for tiny dynamic binary rewriter fox x86 instruction set. This is a port to the TinyInst by Google Project Z

Asuka 40 Dec 22, 2022
blackstar is a Polymorphic Keylogger written in C, for research purposes only

blackstar blackstar is a Polymorphic Keylogger written in C, for research purposes only. It is based on the whitecomet project. Introduction The goal

null 11 Aug 3, 2022
RISC-V has a 128-bit ISA that is fairly developed, but not standardized fully yet.

128-bit RISC-V assembler RISC-V has a 128-bit ISA that is fairly developed, but not standardized fully yet. I am maintaining a RISC-V userspace emulat

Alf-André Walla 39 Nov 20, 2022
Crappy RISC-V CPU and fancy peripherals designed to be useful.

Crappy RISC-V CPU and fancy peripherals designed to be useful. Always half-baked. Prioritize compatibility over performance.

Peter Gu 29 Dec 9, 2022
A video input (V4L2) to NDI converter that works with Raspberry Pi (32-bit and 64-bit), and Intel/AMD CPUs

V4L2 to NDI V4L2 to NDI is an application that connects to attached V4L2 devices and encodes the video signal into NDI It uses the NDI library, allowi

Luke Plassman 52 Dec 30, 2022