Commit Graph

61 Commits

Author SHA1 Message Date
Virgil Dupras
b1a95648f1 De-stabilize EXIT
This marks the end of wordrefs in stable ABI. Nice.
2020-09-19 20:35:35 -04:00
Virgil Dupras
3aa681ceca Remove ";" word
The ":" now takes care of scanning for ";". Conceptually, having
";" as an immediate word is slightly simpler than the approach in
this commit, but when bootstrapping is involved, this simpler
approach gets murkier.

Moreover, it got even murkier-er when trying to de-stabilize EXIT,
so here we are.
2020-09-19 20:22:23 -04:00
Virgil Dupras
53239c8f84 De-stabilize (n) 2020-09-19 19:44:15 -04:00
Virgil Dupras
68dd800bd1 Remove LIT< in favor of LIT" exclusively
This duplicated feature existed because of bootstrapping issues
with LIT", but again, with careful threading, we can clean things
up.

We can now have a proper "Collapse OS" prompt :)
2020-09-19 18:51:29 -04:00
Virgil Dupras
eefbf66e95 De-stabilize (br), (?br), (loop), (s)
When writing the xcomp documentation, I realized that with careful
threading and by accepting a bit of code duplication in the xcomp
toolset, I could de-stabilize a couple of words.

(n) and EXIT are a bit trickier, but I think it can be done. It
would be nice to get rid of stable wordrefs...
2020-09-19 13:54:01 -04:00
Virgil Dupras
3295f1689e doc: add cross.txt 2020-09-19 10:32:28 -04:00
Virgil Dupras
6d180f737a doc: fix typos and inaccuracies 2020-09-19 09:04:18 -04:00
Virgil Dupras
82b0b81521 doc: fix a few typos and inaccuracies 2020-09-18 21:13:28 -04:00
Virgil Dupras
1a6a549857 Make the SPI Relay protocol support multiple devices
Working on programming AVR chips exposes a glaring omission in my
first design of the SPI Relay: not allowing multiple devices make
this task hard. I constantly have to unplug my SD card before, plug
the AVR chip holder, then play a bit, then unplug the AVR holder,
then replug the SD card...

My prototype for a SPI relay design is built, but I haven't tested
it yet. I need to adapt the code first, which is what I do here.

When the prototype is tested, I'll update the SDC recipe with a new
schema.
2020-09-17 09:48:55 -04:00
Virgil Dupras
350b7c5939 avr: improve docs
The batch mode thing seems to have been caused by bad timing on my
prototype. Now that I've corrected it, live interaction seems to
work fine.
2020-09-05 16:52:46 -04:00
Virgil Dupras
5b4917dbe9 avr: allow writing to flash 2020-09-05 14:07:13 -04:00
Virgil Dupras
4910b9caef core: add AMOVEW 2020-08-31 12:11:17 -04:00
Virgil Dupras
286f8968fd doc: add AVR documentation 2020-08-30 08:53:03 -04:00
Virgil Dupras
0b39a975fe doc: add doc about editing text 2020-08-19 17:43:54 -04:00
Virgil Dupras
124da6adec Move SD Card subsystem outside of RC2014 recipe and add protocols
Although the SPI Relay driver is RC2014-specific, the SD Card driver
is generic enough to be a subsystem. That's the second subsystem we
add and this warrants, I think, the formalization of a new concept:
protocols.
2020-08-16 14:30:33 -04:00
Virgil Dupras
ab72a4f383 doc: take bootstrap guide out of blkfs 2020-08-16 08:33:02 -04:00
Virgil Dupras
fd69195799 doc: take dictionary out of blkfs 2020-08-16 08:22:41 -04:00
Virgil Dupras
d03d93668f doc: take implementation notes out of blkfs 2020-08-16 08:08:23 -04:00
Virgil Dupras
5c4bbaabf4 doc: move usage documention out of the system 2020-08-15 19:40:36 -04:00
Virgil Dupras
a3a83ae49b doc: improve primer 2020-08-15 18:57:03 -04:00
Virgil Dupras
ffcd93699e doc: out-of-system documentation
I've changed my mind about having documentation in-system. It doesn't
serve much of a purpose and make blkfs significantly heavier.

This commit is the first step in writing a documentation outside of
the blkfs.
2020-08-10 10:02:10 -04:00
Virgil Dupras
6bf51ae57c Forth reboot underway! 2020-04-02 20:44:29 -04:00
Virgil Dupras
08328b86a9 doc: add reverse engineering notes for trs80-4p 2020-02-21 10:39:51 -05:00
Virgil Dupras
bab18216aa recipes/trs80: add instructions to save recv program to floppy 2020-02-10 11:25:05 -05:00
Virgil Dupras
9d8aa3a0d0 Add TRS-80 model 4P hardware doc
It's a condensed version of the technical manual that can be a bit
more practical to use for quick referencing.
2020-01-25 14:44:30 -05:00
Virgil Dupras
9a7617115f doc: add "Understanding the code" walkthrough 2020-01-05 10:47:23 -05:00
Virgil Dupras
097c677641 emul/zasm: use libcfs
This allows us to get rid of the zasm.sh wrapper.
2019-12-31 15:07:39 -05:00
Virgil Dupras
3db38b0d89 basic: add while command 2019-12-12 11:17:10 -05:00
Virgil Dupras
1710c865dc doc: refer to the new BASIC shell in example
ref #80
2019-12-11 14:57:07 -05:00
Virgil Dupras
15e44ec524 doc: add TI83+/TI84+ doc page 2019-12-02 13:51:36 -05:00
Virgil Dupras
10864afa96 recipes/ti84: use the BASIC shell 2019-12-01 20:11:13 -05:00
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