Virgil Dupras
45b8e84e2a
shell: de-macro-ize
5 years ago
Virgil Dupras
56760b5aba
stdio: de-macro-ize
5 years ago
Virgil Dupras
dfce0d3a62
tools/emul: fix shell RAMSTART
5 years ago
Virgil Dupras
def6c2123d
tools/emul: clean up the place a bit
5 years ago
Virgil Dupras
2f0dd5d668
zasm: iiiiiiiincluuuuuuudes!!1!
5 years ago
Virgil Dupras
a2d6cea72f
cfspack: fix bug where we would underallocate blocks
5 years ago
Virgil Dupras
ede228374c
fs: allow fsNext to skip more than one block
When B>1, fsNext failed because HL was changed in the Seek call.
5 years ago
Virgil Dupras
e18879fcb2
zasm emul: hook fsdev in glue code
5 years ago
Virgil Dupras
df67a38f81
Extract fs_cmds.asm from fs.asm
5 years ago
Virgil Dupras
23f0dc18ca
zasm emul: add tooling for includes fsdev
On build, pack `parts/z80` into a CFS and embed it into the emulated
zasm executable as an fsdev. This will allow for the upcoming include
directive to have something to go to.
For now, this is useless except for inflating the emulated zasm's size.
5 years ago
Virgil Dupras
22c7eeaa5d
Move apps/zasm/tests to tools/tests/zasm
This 'apps' folder is going to disappear. Everything is going to be a
"part" to be assembled through recipes. 'apps' has no meaning.
5 years ago
Virgil Dupras
0ae91e55ec
zasm: big local symbols overhaul
5 years ago
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.
5 years ago
Virgil Dupras
34ff0a6c2a
zasm: consolidate code
5 years ago
Virgil Dupras
a2b5b1efab
zasm: add one layer of indirection in symbol registry
We'll need it for an upcoming "local labels" registry.
5 years ago
Virgil Dupras
fa28d64278
zasm: change ioRewind to ioSeek
Will need it soon.
5 years ago
Virgil Dupras
33a1ee250d
zasm: rename curOutputOffset to ZASM_PC
5 years ago
Virgil Dupras
a994867a86
Wohoo! zasm assembles core.asm!!!
5 years ago
Virgil Dupras
b0218349ff
zasm: support multiple instructions on single line
5 years ago
Virgil Dupras
23fd493013
core: make a bit more zasm-friendly
5 years ago
Virgil Dupras
1010e8372c
zasm: add support for subtractions in expressions
5 years ago
Virgil Dupras
67803f6cb5
zasm: don't upcase char literals
5 years ago
Virgil Dupras
72d2a8f073
zasm: add support for + expressions
5 years ago
Virgil Dupras
99a7c94c9f
zasm: make "double parsing" a bit more solid
It was previously skipped on a local label.
5 years ago
Virgil Dupras
7972b92be1
zasm: refactoring
5 years ago
Virgil Dupras
2c0166814f
zasm: support inline labels
That is, labels with code following right afterwards.
5 years ago
Virgil Dupras
a486a2a81e
zasm: support char literals
5 years ago
Virgil Dupras
2de69ee7cd
zasm: add support for local labels
5 years ago
Virgil Dupras
17dbee6a49
zasm: deduplicate code
5 years ago
Virgil Dupras
746c86cbf8
zasm: make getSymVal not responsible for calling symFind
With local labels, these two will have to be decoupled.
5 years ago
Virgil Dupras
c9deac599e
zasm: add support for LD r, r' instructions
5 years ago
Virgil Dupras
878bc2919f
zasm: add support for relative labels
5 years ago
Virgil Dupras
1e3982d3ab
zasm: make DE indicate the last line to be read
Facilitates debugging
5 years ago
Virgil Dupras
dd6fa5d38b
zasm: properly propagate error conditions
Gives clearer output on errors. Easier debugging...
5 years ago
Virgil Dupras
86cad39de4
zasm: fix wrong logic in .numberTruncated error condition
`xor c` didn't do what I thought it did at the time. Newbie mistake,
there are probably a lot like this scattered around...
5 years ago
Virgil Dupras
71cbd24e1f
Add filesystem docs
5 years ago
Virgil Dupras
4f44d3de63
parts/z80/fs: add "fopn" command
5 years ago
Virgil Dupras
9b4b907236
tools/emul/shell: fix srong SeekL return value
Also, add warning on attempts to write to ROM.
5 years ago
Virgil Dupras
51bab80a4c
parts/z80/fs: fix fsInitMeta writing to ROM
5 years ago
Virgil Dupras
1ea5bedb4f
blockdev: fix broken blkSeek/blkTell
scas didn't warn about this, but it seems that `jr` calls were out of
range. Seek and Tell was broken. Replacing `jr` with `jp` does the
trick.
5 years ago
Virgil Dupras
c77d96da22
blockdev: clarify routines specs
5 years ago
Virgil Dupras
a86738ae84
tools/emul/shell: add filesystem support
With the help of the newly-introduced cfspack tool, we can mount a
filesystem in our emulated shell and play around. Read-only for now.
Unpacking incoming.
5 years ago
Virgil Dupras
d6f5cf5b90
zasm: fix first pass inversion bug
Also, confirm in tests that we can refer to other symbols in `.equ`.
5 years ago
Virgil Dupras
6aa53afabc
zasm: add memdump mode
5 years ago
Virgil Dupras
89848dbfe2
zasm: add support for .equ
5 years ago
Virgil Dupras
6d4515cd03
zasm: little code reorganisation
5 years ago
Virgil Dupras
95f53d0ce3
zasm: support symbols in .dw directive
5 years ago
Virgil Dupras
c000d5cfb1
zasm: support forward label references!
5 years ago
Virgil Dupras
c239ec7dea
zasm: read input in two passes
5 years ago
Virgil Dupras
6a804a9c64
zasm: buffer stdin in emulator
Also, add a port for rewinding stdin.
5 years ago