1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-24 03:58:06 +11:00
collapseos/apps/zasm
Virgil Dupras e9244b80ee zasm: big I/O overhaul
Instead of buffering input in memory one line at a time, we go in "just
in time" mode and always read contents directly from I/O, without
buffering.

It forces us to implement a `ioPutback` scheme, but on the other hand it
greatly simplifies cases where multiple tokens are on the same line
(when a label is directly followed by an instruction).

The end result feels much more solid and less hackish.
2019-05-16 07:53:42 -04:00
..
tests Wohoo! zasm assembles core.asm!!! 2019-05-14 16:50:35 -04:00
directive.asm zasm: big I/O overhaul 2019-05-16 07:53:42 -04:00
expr.asm zasm: add support for subtractions in expressions 2019-05-14 16:39:10 -04:00
instr.asm zasm: big I/O overhaul 2019-05-16 07:53:42 -04:00
io.asm zasm: big I/O overhaul 2019-05-16 07:53:42 -04:00
main.asm zasm: big I/O overhaul 2019-05-16 07:53:42 -04:00
parse.asm zasm: support char literals 2019-05-14 13:53:12 -04:00
README.md Add zasm app 2019-04-16 13:36:57 -04:00
symbol.asm zasm: add one layer of indirection in symbol registry 2019-05-15 14:30:41 -04:00
tok.asm zasm: big I/O overhaul 2019-05-16 07:53:42 -04:00
util.asm zasm: don't upcase char literals 2019-05-14 15:42:15 -04:00

z80 assembler

This is probably the most critical part of the Collapse OS project. If this app can be brought to completion, it pretty much makes the project a success because it ensures self-reproduction.

Running on a "modern" machine

To be able to develop zasm efficiently, libz80 is used to run zasm on a modern machine. The code lives in emul and ran be built with make, provided that you have a copy libz80 living in emul/libz80.

The resulting zasm binary takes asm code in stdin and spits binary in stdout.