r8asm 0.4.0

An assembler for the R8 fantasy retro CPU.
Documentation

Crate Docs CI Audit Maintenance

An assembler for the R8 fantasy retro CPU architecture.

Installation

cargo install --locked r8asm

Usage

Assembling R8 source files

Prepare your program in a text file, and run:

r8asm my_prog.asm

If the program assembles correctly, this will produce a my_prog.bin file you can run with the monitor.

Use the --list switch to also produce a listing to the console:

r8asm --list my_prog.asm
C000              RAM_TEST:
C000 19 FD FF         ld cd, 0xFFFD  ; top of possible RAM
C003 10 02            ld a, 0x02

The --stdoutformat switch will print a formatted version of the source code:

r8asm --stdoutformat my_prog.asm
RAM_TEST:
    ld cd, 0xFFFD  ; top of possible RAM
    ld a, 0x02

The --format switch will apply the same formatting to the source file in-place:

r8asm --format my_prog.asm

Disassembling R8 binary files

Use the --dis switch to disassemble a binary file:

r8asm --dis my_prog.bin

This will print the disassembled listing.

See also

  • r8cpu: Core types and logic for the R8 architecture.
  • rx82: A low-level emulator for an R8-based computer system.

Changelog

  • 0.4.0 — listing and formatting