Commit Graph

161 Commits

Author SHA1 Message Date
Virgil Dupras
340a474941 emul/shell: use '@' symbol in jump table 2019-10-04 20:29:42 -04:00
Virgil Dupras
612323f714 zasm: add "last value" symbol (@) 2019-10-04 20:26:21 -04:00
Virgil Dupras
d1735c3a73 zasm: remove last remnants of "old style" variables
This makes zasm suitable to run from ROM.
2019-07-25 14:02:04 -04:00
Virgil Dupras
1c6a7caeae recipes/sms/romasm: make zasm's memory usage fit the SMS 2019-07-23 16:50:19 -04:00
Virgil Dupras
c2d84563dd zasm: allow duplicate const definition
This will allow interesting override scenarios, adding flexibility.
2019-07-23 16:01:23 -04:00
Virgil Dupras
1dec33e02a zasm: make symbol registry a bit more straightforward
Instead of strings of variable length driving the iteration of the
registry, we do so through records that keep track of lengths and
counts.
2019-07-23 15:21:42 -04:00
Virgil Dupras
02c7eb0161 zasm: clarify strlen's API 2019-07-23 14:59:38 -04:00
Virgil Dupras
cdb206b7a5 zasm: fix nasty (iy+d) misparsing bug
*sob*...
2019-07-23 13:58:18 -04:00
Virgil Dupras
b95f4c8c24 zasm: remove SYM_CTX_PTR 2019-07-22 16:34:40 -04:00
Virgil Dupras
f4f91ebd79 zasm: remove SYM_CTX 2019-07-22 16:13:00 -04:00
Virgil Dupras
311d04e9aa zasm: make symbol registry easily parametrizable
I'm about to split the global registry in two (labels and consts)
and the previous state of registry selection made things murky.
Now it's much better.
2019-07-22 15:13:09 -04:00
Virgil Dupras
34f499184d zasm: add ".bin" directive
Also, remove zasm/test7 because it changes too much all time time
(whenever zasm changes) and isn't precise enough. Too much noise,
not worth it.
2019-07-21 12:58:02 -04:00
Virgil Dupras
01031a780a ed: Add 'w' command 2019-07-21 11:40:26 -04:00
Virgil Dupras
942d2a952d ed: take filename as an argument
This hard-binds ed to the filesystem (I liked the idea of working
only with blockdevs though...), but this is necessary for the
upcoming `w` command. We need some kind of way to tell the
destination to write to truncate itself.

This only has a meaning in the filesystem, but it's necessary to
let the file know that its registered file size has possibly
shrunk.

I thought of alternatives that would have allowed me to keep ed
blkdev-centered, but they were all too hackish to my own taste.

Hence, this new hard-bind on files.
2019-07-20 19:43:07 -04:00
Virgil Dupras
fe15bafeca zasm: fix bug with registry selection
During expression parsing, if a local label was parsed, it would
select the local registry and keep that selection, making
subsequent global labels register in the wrong place.
2019-07-20 18:07:52 -04:00
Virgil Dupras
a7afbe091e tools/tests: remove scas requirement
I'm about to break compatibility with scas. Before I do that, I
need to adjusts tests. Instead of running scas to compare results,
we commit expected result as binaries directly in the repo.
2019-07-20 17:13:57 -04:00
Virgil Dupras
253674ea05 Fix broken tests
Also, make tests run in a *BSD environment
2019-07-19 14:24:35 -04:00
Virgil Dupras
eefadc3917 ed: add support for 'a' and 'i' 2019-07-14 17:35:21 -04:00
Virgil Dupras
e0f2a71dfc apps/ed: print specified line 2019-07-13 14:01:20 -04:00
Virgil Dupras
237d04fefd zasm: update bootstrap bin 2019-07-13 11:54:47 -04:00
Virgil Dupras
3491c26132 apps/ed: start implementing I/O 2019-07-13 11:29:06 -04:00
Virgil Dupras
3d474c9121 apps/ed: first steps 2019-07-13 09:57:37 -04:00
Virgil Dupras
252d71f1b8 Make tools/emul *BSD-friendly 2019-07-11 21:21:54 -04:00
Virgil Dupras
ff7a114736 zasm: update bootstrap bin 2019-07-02 14:12:49 -04:00
Virgil Dupras
54b0602710 zasm: add support for RES and SET 2019-07-02 14:12:29 -04:00
Virgil Dupras
63486126ef zasm: update bootstrap bin 2019-07-01 10:56:38 -04:00
Virgil Dupras
d6b391e39a Update bootstrap binaries 2019-06-19 13:22:51 -04:00
Virgil Dupras
7cdc288ef2 zasm: print progress indicator while assembling 2019-06-19 11:42:39 -04:00
Virgil Dupras
6f61aa404f tools/cfsunpack: new tool 2019-06-17 15:21:05 -04:00
Virgil Dupras
4b423a9dc6 tools/blkdump.py: new tool
Also, rename "download.py" to "memdump.py".
2019-06-17 09:02:01 -04:00
Virgil Dupras
3bc165c8f6 Update bootstrap bin 2019-06-15 20:54:27 -04:00
Virgil Dupras
3e7d181d3c zasm: properly raise error on bas ioPutC calls 2019-06-15 20:01:17 -04:00
Virgil Dupras
7ba8e85a4a Update bootstrap binaries 2019-06-15 15:53:03 -04:00
Virgil Dupras
4ea7839488 New tool: download.py 2019-06-14 16:06:18 -04:00
Virgil Dupras
df5549ae76 tools/upload.py: support files larger than 0xff bytes 2019-06-14 15:06:14 -04:00
Virgil Dupras
b742d48b75 Update bootstrap binaries 2019-06-05 19:52:56 -04:00
Virgil Dupras
3dde51ae98 Allow file-to-file compilation in the emulated shell 2019-06-05 19:51:19 -04:00
Virgil Dupras
fc81bce70f Fix error handling when writing to files in emulated shell 2019-06-05 16:13:15 -04:00
Virgil Dupras
c18d42f08b fs: further adjust to previous blkdev refactoring
Previous refacoring broke all seek/tell within fs. fs handles now lost
the responsibility to keep track of current position. It's blkdev's job.
2019-06-04 20:45:01 -04:00
Virgil Dupras
ae028e3a86 blockdev: make implementors "random access"
This huge refactoring remove the Seek and Tell routine from blockdev
implementation requirements and change GetC and PutC's API so that they
take an address to read and write (through HL/DE) at each call.

The "PTR" approach in blockdev implementation was very redundant from
device to device and it made more sense to generalize. It's possible
that future device aren't "random access", but we'll be able to add more
device types later.

Another important change in this commit is that the "blockdev handle" is
now opaque. Previously, consumers of the API would happily call routines
directly from one of the 4 offsets. We can't do that any more. This
makes the API more solid for future improvements.

This change forced me to change a lot of things in fs, but overall,
things are now simpler. No more `FS_PTR`: the "device handle" now holds
the active pointer.

Lots, lots of changes, but it also feels a lot cleaner and solid.
2019-06-04 15:36:20 -04:00
Virgil Dupras
63473cc2e3 blockdev: make selection structure opaque
I'm about to change that structure and I don't want fs to be messed up
by this. I'm proceeding step by step...
2019-06-04 09:56:36 -04:00
Virgil Dupras
50a26f6e39 recipe/rc2014/zasm: new recipe 2019-06-03 13:35:21 -04:00
Virgil Dupras
dfe19e20e4 Includes work fine when assembling from the shell 2019-06-03 11:24:52 -04:00
Virgil Dupras
7ae29015de tools/emul: add hex representation to debug output
My mind isn't so good at decimal -> hex translations. It helps to have
this...
2019-06-03 11:16:06 -04:00
Virgil Dupras
082fa3431d We can now assemble source files from within the shell! 2019-06-03 11:15:07 -04:00
Virgil Dupras
78345b336e Update bootstrap bin 2019-06-03 11:14:15 -04:00
Virgil Dupras
40b3d5e11e tools/emul/shell: copy user.h in its cfsin
This way, we can compile apps from within the shell that run on the
shell.
2019-06-03 09:26:28 -04:00
Virgil Dupras
bed7032ee5 pgm: have its own file handle 2019-06-03 09:25:17 -04:00
Virgil Dupras
ecbb77072e tools/emul/shell: allow the growing of fsdev 2019-06-03 08:42:08 -04:00
Virgil Dupras
f511289a3a tools/emul: make shell's cfsin always have all apps compiled in it 2019-06-03 08:34:29 -04:00