Commit Graph

80 Commits

Author SHA1 Message Date
Virgil Dupras
572e3566eb Add upload tooling for BASIC shell 2019-11-30 22:36:14 -05:00
Virgil Dupras
019d05f64c Make the shell a userspace app
That's my mega-commit you've all been waiting for.

The code for the shell share more routines with userspace apps than with kernel
units, because, well, its behavior is that of a userspace app, not a device
driver.

This created a weird situation with libraries and jump tables. Some routine
belonging to the `kernel/` directory felt weird there.

And then comes `apps/basic`, which will likely share even more code with the
shell. I was seeing myself creating huge jump tables to reuse code from the
shell. It didn't feel right.

Moreover, we'll probably want basic-like apps to optionnally replace the shell.

So here I am with this huge change in the project structure. I didn't test all
recipes on hardware yet, I will do later. I might have broken some...

But now, the structure feels better and the line between what belongs to
`kernel` and what belongs to `apps` feels clearer.
2019-11-15 15:37:49 -05:00
Virgil Dupras
7cf3ed38da Extract str.asm from core.asm and make core included by userspace
Most of register fiddling routines (which is now the only thing contained
in care.asm) are used by almost all userspace apps, often in inner loops.

That makes the penalty of using jump tables for those a bit too high.
Moreover, it burdens jump tables needlessly.

Because this unit is very small (now that string routines are out), it makes
sense to always include it in binaries.
2019-11-14 10:14:15 -05:00
Virgil Dupras
7274dccbe7 Move ASCII consts to ascii.h
And made them shorter in name. The new ascii.h file allow reuse in userspace
code.
2019-11-13 20:38:06 -05:00
Virgil Dupras
2a55bfd375 stdio: remove a layer of indirection in GetC/PutC
We use zasm's ability to use labels in .equ directive.

We didn't do it before because for a while, we were in between scas
and zasm (scas was used in automated tests) so we needed to use the
lowest common denominator: zasm doesn't have macros and scas can't
use labels in .equ directives.

This forced us to add this layer of indirection. But now that we are
completely cut from scas' dependency, we can use this nice zasm's
ability.
2019-11-04 09:55:12 -05:00
Virgil Dupras
b745f49186 Rename blockdev's API routines to GetB/PutB
The goal is to avoid mixing those routines with "character devices"
(acia, vpd, kbd) which aren't block devices and have routines that
have different expectations.

This is a first step to fixing #64.
2019-10-30 16:59:35 -04:00
Virgil Dupras
63d6cf0875 Fix mis-documentation 2019-10-04 13:52:14 -04:00
Virgil Dupras
55be698f61 Pimp up the docs a little bit 2019-10-04 12:05:05 -04:00
Virgil Dupras
df5549ae76 tools/upload.py: support files larger than 0xff bytes 2019-06-14 15:06:14 -04:00
Virgil Dupras
d40940a1ff doc/zasm: fix error 2019-06-14 14:24:51 -04:00
Virgil Dupras
3dde51ae98 Allow file-to-file compilation in the emulated shell 2019-06-05 19:51:19 -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
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
dfe19e20e4 Includes work fine when assembling from the shell 2019-06-03 11:24:52 -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
26e71ee580 Update shell/blkdev docs 2019-06-02 11:23:24 -04:00
Virgil Dupras
2e8af376e3 pgm: new kernel module
The pgm module implements a shell hook so that when an unknown command
is typed, we look into the mounted filesystem and look for a file with
the same name as the command. If we find one, we load it in memory and
run it.
2019-05-31 14:54:15 -04:00
Virgil Dupras
8923fefeff Update docs 2019-05-20 12:11:45 -04:00
Virgil Dupras
71cbd24e1f Add filesystem docs 2019-05-12 16:06:27 -04:00
Virgil Dupras
4f44d3de63 parts/z80/fs: add "fopn" command 2019-05-12 15:38:58 -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
6597e8a75a doc: add emulate section 2019-04-16 11:37:04 -04:00
Virgil Dupras
056de2b19d doc: add glue code section 2019-04-16 11:26:58 -04:00
Virgil Dupras
6c4489d2a3 Add blockdev doc 2019-04-16 10:40:51 -04:00
Virgil Dupras
a27da6f41a add mmap part
This also introduces the "seek" shell command.
2019-04-16 08:36:26 -04:00
Virgil Dupras
a5addc989c shell: rename seek to mptr
going to use `seek` for block devices
2019-04-15 20:42:12 -04:00
Virgil Dupras
c996da8ac8 shell: add error codes to cmds 2019-04-15 20:38:25 -04:00
Virgil Dupras
f571664853 Improve user guide 2019-04-15 13:24:20 -04:00
Virgil Dupras
9aae4ea040 Add user guide 2019-04-15 12:10:41 -04:00