Skip to content

Introduction

Rui Figueira edited this page Jun 3, 2020 · 2 revisions

Introduction

APCPU-32 is s general purpose 32 bits virtual computer.

Although the general idea for this architecture goes back to the mid-nineties when I was working on a hobby game project, serious work only started around the Spring of 2012, when all the craze around Notch's 0x10c game started. The architecture mostly follow a RISC like approach, and in some areas where appropriate it borrows from CISC architectures.

The main design decision behind the architecture was to make it relatively easy for beginners to use it, but still provide the features for advanced users if they require it, such as memory protection, user/supervisor mode, coroutines, virtual memory, etc. In theory it should provide the necessary features to create a decent Operating System.

The second design decision was to make it possible to run as many virtual machines as possible on a single host machine. This influenced how realistic some aspects of the architecture are compared to real world computers. Although in most cases the architecture's characteristics have real-world equivalents, in some cases it's completely fictional in order to make it easier for the programmer or to make its simulation easier for the host machine.

Features at a glance

  • 32 bits load/store architecture
  • Mostly Orthogonal instruction set
  • 16 general purpose registers
  • 16 floating point registers
  • User and Supervisor cpu modes http://en.wikipedia.org/wiki/CPU_modes
  • MMU providing memory protection and virtual memory
    • Allows each process to have its own memory pages
    • Disabled by default. When booting it presents a flat memory model without any protections
  • Fast context switching
  • Allows preemptive multitasking
  • Supports up to 32 attached devices/peripherals.

1 2 3 4 5

Clone this wiki locally