Files | |
---|---|
![]() | .. |
![]() | 8-bit_prgm_flash_v5 |
![]() | README.md |
![]() | TODO.md |
![]() | assembler.py |
![]() | basic |
![]() | bin |
![]() | build_romfs.py |
![]() | debug |
![]() | include |
![]() | kernel |
![]() | old |
![]() | sim_vga.c |
![]() | template |
![]() | tests |
![]() | upload-new |
![]() | upload-new.sh |
![]() | vga |
![]() | zmach |
assembler.py
is a fairly basic assembler to aid in programming the 8-bit computer.
It supports labels, macros, file includes, sections (text, rodata, data, bss), and not much else.
Programs can be assembled in either raw_ram_only
or raw_flash_ram
styles.
raw_flash_ram
programs can be written to and run directly from the computer's flash memory chips.
raw_ram_only
programs must be copied to ram before they're run (this is done via the prototype kernel).
Set this option via the conf_out_style
variable at the top of assembler.py
.
For hardware version 2, assemble and upload the program per upload-new.sh
and the 8-bit_prgm_flash_v5
Arduino sketch.
The program will be stored on a flash chip attached to an Arduino Mega, and the Arduino will take care of
programming the computer's flash chips in-system.
[TODO: hardware version 3]
An emulator that simulates the main computer, VGA expansion board, and keyboard buffer is in sim_vga.c (requires ncurses).
[TODO]
raw_flash_ram
programs cannot have initialized read-write data, on account of needing a kernel to help them
load it.
The prototype kernel does not support such loading.raw_flash_ram
output style is used (with a bss section), performance is quite bad.
This is due to handling section layout by padding the input assembler code with no-ops, which then must
all be processed.
A simple optimization to skip processing these padding instructions would resolve the problem.