1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-10 02:48:05 +11:00
Commit Graph

98 Commits

Author SHA1 Message Date
Virgil Dupras
7a0e63746f parse: don't validate 0x and 0b lengths
It doesn't serve much purpose and takes up many precious bytes. And,
after all, parsed didn't do it either...
2020-04-21 20:40:23 -04:00
Virgil Dupras
372524fd19 Move xcomp to blocks 2020-04-21 20:30:14 -04:00
Virgil Dupras
4967c2add2 Merge z80c.fs and boot.fs into boot.z80 2020-04-20 21:27:34 -04:00
Virgil Dupras
bf49ca2ed2 recipes/rc2014: fix Makefile
It didn't have z80a anymore.
2020-04-20 19:22:43 -04:00
Virgil Dupras
98191d0b0d recipes/rc2014/sdcard: now works under Forth! 2020-04-19 16:56:37 -04:00
Virgil Dupras
dfaa1dc101 link: add "offset" argument to RLDICT
As long as our target was the first word of the "user" dict, using
target's prev to compute offset was fine, but when the target is not
the first word, this system breaks down.

This is the case when, instead of including source code in our boot
binary, we paste it in Collapse OS' prompt.

Also, adjust RC2014 recipe to include stage 3 assembling instructions
with the "paste into prompt" method.
2020-04-19 16:28:40 -04:00
Virgil Dupras
a2d89de557 drv/sdc: implement core words in z80
In addition to making the driver significantly faster, it allows us
to make SDC port configuration opaque to sdc.fs.
2020-04-18 20:33:51 -04:00
Virgil Dupras
287213fc68 recipes/rc2014/eeprom: remove old stuff 2020-04-17 21:10:20 -04:00
Virgil Dupras
733aff7b7a rc2014: adjust bootstrapping instructions 2020-04-16 09:27:49 -04:00
Virgil Dupras
b536d3bfd6 rc2014: complete the EEPROM recipe 2020-04-13 14:41:02 -04:00
Virgil Dupras
d0545d555f upload: use A! instead of C!
It makes the tool much more versatile. I'll have adev being included
in all recipes, so it can be assumed.
2020-04-13 12:00:56 -04:00
Virgil Dupras
d08a9711c5 boot: make HERE point to RAMEND instead of CURRENT
The former was only used in the peculiar context of "/emul". The
regular case is actually HERE pointing to RAMEND on boot.
2020-04-13 11:43:15 -04:00
Virgil Dupras
d4f65911c0 rc2014: add notes about stage3.bin 2020-04-12 14:15:06 -04:00
Virgil Dupras
9548514ff0 rc2014: dictionary relinking now works! 2020-04-12 10:24:53 -04:00
Virgil Dupras
bf447f58c5 link: handle doesWord 2020-04-11 16:38:45 -04:00
Virgil Dupras
13cf294201 rc2014/acia: adjust to latest developments 2020-04-11 15:11:36 -04:00
Virgil Dupras
c515720e23 Revert "Remove link.fs"
Let's revisit the relinking approach, with LITA this time.
This reverts commit 6652125d47.
2020-04-11 13:31:17 -04:00
Virgil Dupras
6368cc3bac Remove (sysv)
Replace its usages with direct RAM+ offsets. The (sysv) mechanism was
incompatible with cross-compilation of a full interpreter.
2020-04-10 14:57:00 -04:00
Virgil Dupras
05c38424c7 recipes/rc2014: stage2 WIP 2020-04-08 09:13:46 -04:00
Virgil Dupras
79527976ab recipes/rc2014: stage2 WIP 2020-04-07 22:36:59 -04:00
Virgil Dupras
6652125d47 Remove link.fs
This was a dead end.
2020-04-07 21:23:42 -04:00
Virgil Dupras
521ff84ca4 Reserve some RAM for future features 2020-04-07 17:32:04 -04:00
Virgil Dupras
7390cb18ed rc2014: a little cleanup 2020-04-05 09:29:03 -04:00
Virgil Dupras
58e88119ec rc2014: Forth Collapse OS, fully operational! 2020-04-05 09:09:00 -04:00
Virgil Dupras
e5f22c7d91 rc2014: update README 2020-04-04 18:10:00 -04:00
Virgil Dupras
edb2771488 rc2014: bingo!
Interpreter is functional in the emulator!
2020-04-04 17:43:00 -04:00
Virgil Dupras
7b42bbde27 rc2014: aaalmost there...
Red 5 standing by.
2020-04-04 17:07:35 -04:00
Virgil Dupras
d1f4dc0ca3 rc2014: aaaalmost there.... 2020-04-04 14:27:23 -04:00
Virgil Dupras
5be9b9cd3e rc2014: we're almost getting there... 2020-04-04 10:31:22 -04:00
Virgil Dupras
c56386af02 wip 2020-04-02 23:21:53 -04:00
Virgil Dupras
64a54c72f8 Fix broken recipes 2020-02-26 21:44:37 -05:00
Virgil Dupras
c7ef8bf915 recipes: add "make emul" targets where appropriate 2020-01-02 16:59:38 -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
5b155a5c15 tools: use BASIC's new while loop
Also, increase STDIO_BUFSIZE to 0x40 so that those while loops work.
2019-12-12 12:04:56 -05:00
Virgil Dupras
25d25d017c Replace old shell with BASIC shell
fixes #80
2019-12-11 14:05:34 -05:00
Virgil Dupras
20151a97f8 recipes/rc2014/zasm: use BASIC shell
Also made Makefile actually portable.
2019-12-11 13:01:51 -05:00
Virgil Dupras
880775ae69 recipes/rc2014/sdcard: use BASIC shell 2019-12-11 11:18:32 -05:00
Virgil Dupras
fb93fcd6e6 recipes/rc2014/eeprom: add usr.asm
A little life saver if your target shell doesn't have a proper at28w.
2019-12-09 21:03:31 -05:00
Virgil Dupras
b9292eb8d0 recipes/rc2014/ps2: Use BASIC shell 2019-12-06 20:00:29 -05:00
Virgil Dupras
08392fee60 recipes/rc2014/eeprom: use BASIC shell 2019-12-02 23:00:35 -05:00
Virgil Dupras
10864afa96 recipes/ti84: use the BASIC shell 2019-12-01 20:11:13 -05:00
Virgil Dupras
aad8efeff7 recipes/rc2014/basic: new recipe 2019-11-23 21:22:31 -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
cdd0b64570 Modify userspace .org and RAMSTART expectations
Instead of expecting a `USER_CODE` symbol to be set, we expect `.org` to be
set in all userspace glue code. This gives us more flexibility with regards to
how we manage that.

Moreover, instead of making `USER_RAMSTART` mandatory, we make it default to
the end of the binary, which is adequate in a majority of cases.

Will be useful for my upcoming mega-commit... :)
2019-11-15 10:33:13 -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
9344c4b961 doc: minor improvements 2019-11-04 14:45:10 -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
20c0ba3dd0 Clarify recipes structure
Drop the "{pre,post}-collapse" thing and specify that the rc2014 recipes
are canonical.
2019-11-03 16:09:11 -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