1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 22:48:06 +11:00
Commit Graph

522 Commits

Author SHA1 Message Date
Virgil Dupras
89848dbfe2 zasm: add support for .equ 2019-05-11 22:11:05 -04:00
Virgil Dupras
6d4515cd03 zasm: little code reorganisation 2019-05-10 21:19:34 -04:00
Virgil Dupras
95f53d0ce3 zasm: support symbols in .dw directive 2019-05-10 21:17:19 -04:00
Virgil Dupras
c000d5cfb1 zasm: support forward label references! 2019-05-10 21:14:46 -04:00
Virgil Dupras
c239ec7dea zasm: read input in two passes 2019-05-10 20:32:05 -04:00
Virgil Dupras
6a804a9c64 zasm: buffer stdin in emulator
Also, add a port for rewinding stdin.
2019-05-10 19:55:01 -04:00
Virgil Dupras
34ee91a0d7 zasm: use blkdev IDs as input and output
This will soon allow use to seek and tell on input, which is necessary
for a second pass which is necessary for forward symbol references.

This require making `blkSel` a bit more flexible. Rather than having one
global selected blkdev, each app can select its own, in its own memory
space.
2019-05-10 19:33:34 -04:00
Virgil Dupras
5a6078df4d zasm: add support for hex literals 2019-05-09 22:14:11 -04:00
Virgil Dupras
b87feac785 zasm: add support for labels! 2019-05-09 21:21:08 -04:00
Virgil Dupras
1c17dcb7a2 zasm: consolidate code 2019-05-09 15:55:29 -04:00
Virgil Dupras
d34aff67bb zasm: Read from and write to streams instead of memory 2019-05-09 15:36:03 -04:00
Virgil Dupras
7f27d63c19 Move apps/zasm/emul to tools/emul 2019-05-09 14:09:40 -04:00
Virgil Dupras
193e6e066c Add tools/emul 2019-05-09 12:58:41 -04:00
Virgil Dupras
02808572e6 Update docs 2019-05-09 10:48:36 -04:00
Virgil Dupras
d8bc9c2bdd parts/z80/sdc: implement blockdev's GetC 2019-05-09 10:47:57 -04:00
Virgil Dupras
65a666bfda Re-license to GPLv3
I realize that libz80 is GPL and that this project is MIT. That's not
much of a problem as long as libz80 isn't a big part of the project, but
I'm planning on building more around libz80 so that zasm can replace
scas as an assembler even on modern machines (through an emulated
layer) so that this project can become entirely self-bootstrapped.

If I'm going to do that, I might as well be kosher license-wise. I
don't care much about whether the project is GPL or MIT...
2019-05-08 20:18:05 -04:00
Virgil Dupras
54d0286486 parts/z80/sdc: add sdcSetBlkSize and sdcReadBlk 2019-05-08 20:08:17 -04:00
Virgil Dupras
12ca2bd53e parts/z80/sdc: add sdcInitialize
Also, adjust SD card recipe. Straightforward initialization and read!
2019-05-08 16:03:54 -04:00
Virgil Dupras
3d82d7fb30 recipe/rc2014/sdcard: we read data! 2019-05-07 17:28:07 -04:00
Virgil Dupras
beeb40eb93 recipe/rc2014/sdcard: we got out of initialization! 2019-05-07 16:38:08 -04:00
Virgil Dupras
c9f164a510 recipe/rc2014/sdcard: Make sdinit program output readable text
Makes for a more straightforward test.
2019-05-07 16:20:28 -04:00
Virgil Dupras
e80888555f recipe/rc2014/sdcard: new recipe 2019-05-07 15:47:49 -04:00
Virgil Dupras
ef11059382 parts/z80/sdc: new part
Incomplete, but what it does *does* work. I could handshake CMD0+CMD8 on
a MicroSD HC.
2019-05-07 14:50:24 -04:00
Virgil Dupras
9c7f006d47 tools/upload: make I/O a bit slower
Without delays between read/writes, I often add lockups.
2019-05-07 14:49:34 -04:00
Virgil Dupras
cc62991f4e Add tools/upload.py 2019-05-06 10:18:11 -04:00
Virgil Dupras
59b0c83b0e shell: add iowr and iord 2019-05-02 15:18:47 -04:00
Virgil Dupras
f9ae5ca46b zasm: simplify readWord calling
It always reads in the scratchpad with the same max size. No need for
DE-dancing anymore.
2019-05-01 14:19:43 -04:00
Virgil Dupras
6811d98618 zasm: add support for the ".dw" directive 2019-05-01 14:07:01 -04:00
Virgil Dupras
dde5161fc1 zasm: add support for ".db" directive 2019-05-01 11:26:41 -04:00
Virgil Dupras
28e1ba5e26 zasm: adjust parseLine success condition
De-couple "success" from "wrote something to (DE)" so that directive
parsing can be considered successful without writing to (DE).
2019-05-01 10:16:57 -04:00
Virgil Dupras
a00bc8cc4b zasm: remove the "token" variable 2019-04-30 22:32:12 -04:00
Virgil Dupras
5fd9b7812c zasm: make each token type parse the remaining of line directly 2019-04-30 21:55:18 -04:00
Virgil Dupras
a7693ffd86 zasm: still inching toward directives 2019-04-30 21:40:22 -04:00
Virgil Dupras
1ffe05dd09 zasm: creep in the notion of directive 2019-04-30 21:27:44 -04:00
Virgil Dupras
8241298c8f zasm: code consolidation 2019-04-30 21:13:37 -04:00
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.
2019-04-30 20:26:41 -04:00
Virgil Dupras
79b5c701f6 zasm: move token variables from tok.asm into main.asm 2019-04-30 17:04:42 -04:00
Virgil Dupras
a7635cb1ea zasm: allow blank lines in asm source code 2019-04-30 16:24:45 -04:00
Virgil Dupras
eb5c974573 zasm: allow leading whitespace in parsed lines 2019-04-30 16:08:56 -04:00
Virgil Dupras
57c3dfece8 zasm: assemble multiple lines at once 2019-04-30 15:51:39 -04:00
Virgil Dupras
2653826dff zasm: move zasm.asm to instr.asm and create main.asm
instr.asm is for single instruction assembly.
2019-04-30 13:52:14 -04:00
Virgil Dupras
175e1328e7 zasm: consolidate
* Build emulated zasm statically
* Improve comments in zasm.asm
* Fix build
* Use unsetZ from core
2019-04-30 13:45:31 -04:00
Virgil Dupras
055e0d7a31 Split parts in two: z80 and avr
Also, clarify the role of recipes.
2019-04-25 16:03:45 -04:00
Virgil Dupras
a391f85c00 fs: implement GetC, PutC, Seek and Tell on file handle
Very coarse, but I got them to work.
2019-04-23 19:42:10 -04:00
Virgil Dupras
f00334ec89 fs: add private "blk" routines
This way, we can interact with the mounted FS even when we change the
selected blkdev.
2019-04-23 15:50:26 -04:00
Virgil Dupras
3ba0a707e7 blockdev: remove a layer of indirection in block routine storage
This will facilitate "copying" blk selection in FS.
2019-04-23 15:03:23 -04:00
Virgil Dupras
ad217c018e fs: implement block reuse in fsAlloc 2019-04-23 14:00:54 -04:00
Virgil Dupras
684f083e8e fs: add "fdel" command 2019-04-23 13:29:16 -04:00
Virgil Dupras
5eca14d49a fs: implement fsNext
This allows more than one file to be allocated. `fls` properly lists
multiple files.
2019-04-23 12:04:09 -04:00
Virgil Dupras
1a6d285d2d fs: always read whole block meta in memory to avoid seeking 2019-04-23 10:54:56 -04:00