Skip to content

Latest commit

 

History

History

solution_1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Centurion assembly solution by ren14500

Algorithm Faithfulness Parallelism Bit count Deviation

Description

This solution provides two implementations in Centurion assembly, that being the assembly language for the Centurion minicomputer. The Centurion minicomputer is the topic of a series of videos on the YouTube channel UsagiElectric.

The Centurion minicomputer was built around the CPU6 board, which was a further development of the original CPU4 architecture. In turn, that architecture was at least heavily inspired by the Eldorado Electrodata Corporation EE200.

As it stands, there does not seem to be a comprehensive programmer's manual available for Centurion CPU6 assembly. The instruction set and the assembly syntax used in this solution have been deduced by combining the following sources:

In fact, for those interested in the Centurion CPU6 instruction set and the assembler syntax, this solution may itself act as a source of information. For one, the source code included in this solution has been extensively documented.

Implementations

This solution includes two implementations:

  • An implementation to be run on top of the Centurion OS. It uses service calls for time keeping and I/O, and is kept in the file sieveo.asm.
  • An implementation to be run on bare metal, that is directly on the Centurion hardware. It uses memory-mapped I/O (MMIO) to communicate with the console (CRT0), and is kept in the file sieveb.asm.

Sieve sizes

The sieve size for the implementations can be configured by uncommenting a triple of lines at the top of the assembly source files; details are included in the files themselves.
The maxmimum sieve size supported by the implementations is 65,535.

Run instructions

This solution's implementations can be assembled and executed on an actual Centurion minicomputer, or a sufficiently complete emulator. A list of known emulators can be found on the respective page on Nakazoto's CenturionComputer wiki on GitHub.

Use the following commands to edit, assemble and run the solution:

S.CED ZSIEVE 0 CRT0
P.ASM SIEVE 0 DUMMY X
.RUN XSIEVE

For the bare metal version, use the same commands to edit and compile, but don't use .RUN to run the program. Instead, one needs to reboot the (emulated) Centurion and run it from the bootloader - those instructions are in the top of the sieveb.asm file.