Virgil Dupras
a7693ffd86
zasm: still inching toward directives
5 years ago
Virgil Dupras
1ffe05dd09
zasm: creep in the notion of directive
5 years ago
Virgil Dupras
8241298c8f
zasm: code consolidation
5 years ago
Virgil Dupras
98ad223ee1
zasm: introduce the concept of instruction ID
It will make tokenization cleaner and it also makes the instruction
table significantly more compact.
5 years ago
Virgil Dupras
79b5c701f6
zasm: move token variables from tok.asm into main.asm
5 years ago
Virgil Dupras
a7635cb1ea
zasm: allow blank lines in asm source code
5 years ago
Virgil Dupras
eb5c974573
zasm: allow leading whitespace in parsed lines
5 years ago
Virgil Dupras
57c3dfece8
zasm: assemble multiple lines at once
5 years ago
Virgil Dupras
2653826dff
zasm: move zasm.asm to instr.asm and create main.asm
instr.asm is for single instruction assembly.
5 years ago
Virgil Dupras
175e1328e7
zasm: consolidate
* Build emulated zasm statically
* Improve comments in zasm.asm
* Fix build
* Use unsetZ from core
5 years ago
Virgil Dupras
055e0d7a31
Split parts in two: z80 and avr
Also, clarify the role of recipes.
5 years ago
Virgil Dupras
a391f85c00
fs: implement GetC, PutC, Seek and Tell on file handle
Very coarse, but I got them to work.
5 years ago
Virgil Dupras
f00334ec89
fs: add private "blk" routines
This way, we can interact with the mounted FS even when we change the
selected blkdev.
5 years ago
Virgil Dupras
3ba0a707e7
blockdev: remove a layer of indirection in block routine storage
This will facilitate "copying" blk selection in FS.
5 years ago
Virgil Dupras
ad217c018e
fs: implement block reuse in fsAlloc
5 years ago
Virgil Dupras
684f083e8e
fs: add "fdel" command
5 years ago
Virgil Dupras
5eca14d49a
fs: implement fsNext
This allows more than one file to be allocated. `fls` properly lists
multiple files.
5 years ago
Virgil Dupras
1a6d285d2d
fs: always read whole block meta in memory to avoid seeking
5 years ago
Virgil Dupras
c0dbee78de
New part: fs
Very incomplete, but if you play your cards right, you can, with the
shell:
1. Create a new CFS
2. Mount it
3. Allocate a file with an arbitrary name
4. Have it listed with `fls`
5 years ago
Virgil Dupras
07fde3cab5
blockdev: move the new seek mode logic into the seek command
It wasn't a good idea to complicate all blockdev impls with complicated
seeks. Let's just stay in absolute mode for now.
5 years ago
Virgil Dupras
f87cd0485a
blockdev: make "seek" print out its resulting position
Also, extract commands into blockdev_cmds to avoid making blockdev
dependent on stdio.
5 years ago
Virgil Dupras
5071ee9f40
Extract "stdio" part from shell
5 years ago
Virgil Dupras
8b7faa1f02
blockdev: add "type" argument to blkSeek
Allows seeking forward, backwards, to the beginning, to the end.
5 years ago
Virgil Dupras
d3d229a918
shell: support string arguments
No consumer yet, but it's coming...
5 years ago
Virgil Dupras
1bcceb949c
blockdev: add Tell and fix blkGetCW
Calling on blkGetC repeatedly was somehow very unstable and often
failed. I didn't pinpoint exactly why, but keeping the call addr around
and calling that instead seems like a better idea anyway.
5 years ago
Virgil Dupras
196d22c4ab
shell: add "save" command
The opposite of "load"
5 years ago
Virgil Dupras
b4694225c5
blockdev: change GetC API
Instead of waiting, GetC always return immediately, with Z indicating if
something was fetched. The "wait" loop is implemented by the called (and
in the new `blkGetCW`).
This simplifies out-of-bounds verifications for storage blockdevs.
5 years ago
Virgil Dupras
63afa5798b
zasm: add a bunch of instructions
5 years ago
Virgil Dupras
8594084b06
zasm: simplify code
5 years ago
Virgil Dupras
93eb262083
zasm: add a bunch of instructions
5 years ago
Virgil Dupras
e9e2f30fc5
zasm: add support for BIT
5 years ago
Virgil Dupras
e073fbff79
zasm: add support for "special instructions"
Let's not create complex rules for exception cases.
5 years ago
Virgil Dupras
ecf7d7fbd6
zasm: add a bunch of instructions
5 years ago
Virgil Dupras
056bbde710
zasm: add support for IX/IY with displacement
5 years ago
Virgil Dupras
14a410b024
zasm: extract tok.asm from zasm.asm
5 years ago
Virgil Dupras
89972ca210
zasm: add a bunch of instructions
5 years ago
Virgil Dupras
115dc18971
zasm: add support for extended instructions
5 years ago
Virgil Dupras
70f61ec451
zasm: a bit of refactoring
5 years ago
Virgil Dupras
f6dddaa380
zasm: add automated tests and fix a bunch of bugs
A python script generates all possibilities for all supported
instructions and compare zasm output with scas. After having fixed a
couple of bugs, all tests pass!
5 years ago
Virgil Dupras
8ce528c752
zasm: add a bunch of instructions
5 years ago
Virgil Dupras
76caf944dd
zasm: add support for the "e" arg type (djnz, jr)
5 years ago
Virgil Dupras
c5c8369ce9
zasm: Add support for (NN) constants
5 years ago
Virgil Dupras
e1d6178457
zasm: add a bunch of instructions
5 years ago
Virgil Dupras
7996a9997a
zasm: add support for numerical constants
5 years ago
Virgil Dupras
3fe5eb3e60
zasm: add a bunch of primary instructions
5 years ago
Virgil Dupras
a7dc1e7b4a
zasm: make "RET cc" work
5 years ago
Virgil Dupras
279f6e0ad8
zasm: invert emulator io_write() handling
This facilitates debugging. To know the value of `A` at any point,
you can do `out (0), a`. The number of bytes in the output will be the
value of `A`.
5 years ago
Virgil Dupras
9b556c8883
zasm: support "special" groups and groups in arg2
5 years ago
Virgil Dupras
a7538473e4
zasm: add support for variable arguments
5 years ago
Virgil Dupras
38e40bfc16
zasm: make the instruction table fixed
Looping is easier
5 years ago