1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-05 21:30:56 +11:00
Commit Graph

42 Commits

Author SHA1 Message Date
Virgil Dupras
d919a10265 Remove runbin
It's not used
2020-04-13 19:25:28 -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
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
a6efb65010 emul: extract capture mark from icore into xstop.fs 2020-04-10 14:16:45 -04:00
Virgil Dupras
7aa1be070b emul: build boot binary in one pass
... instead of building boot.fs, and then z80c.fs/icore.fs in separate
passes. This strengten xcomp by making it support 2 completely separate
dicts (that is, the X dict is *not* connected to the system dict. The chain
now stops at EXIT def in boot.fs).
2020-04-10 09:55:58 -04:00
Virgil Dupras
68f359d6c2 Add xcomp unit for cross compilation
Memory mapping is a dead end too, solution has to be at a higher
level. xcomp is my new approach.
2020-04-09 08:23:53 -04:00
Virgil Dupras
6652125d47 Remove link.fs
This was a dead end.
2020-04-07 21:23:42 -04:00
Virgil Dupras
d4324292fb Merge remote-tracking branch 'origin/master' into forth 2020-04-07 19:32:30 -04:00
Byron A. Grobe
217df20d77
Moved tools/bin2c to single-level with other tools. 2020-04-07 16:56:55 -05:00
Virgil Dupras
1c6e979028 link: new unit to relink dictionaries
Not quite functional yet, but works in toy situations. The goal is to
concatenate RC2014's bootstrapped dict to the boot binary.
2020-04-06 20:59:55 -04:00
Virgil Dupras
974018831e Add chained comparison support 2020-04-05 16:11:17 -04:00
Byron A. Grobe
f65c189e9b
Replace bin2c.sh with a more portable implementation.
`xxd' is not available on all systems, and on others does not support
the `-i' flag. Since bin2c.sh relied on a tool that I can't seem to find
a compatible version of, I have included a simple, portable replacement in C.

Usage remains the same:
bin2c ARRAYNAME < inputfile > outputfile.

This change is also reflected in emul/Makefile.
2020-04-05 13:04:05 -05:00
Virgil Dupras
ba384bfa0f Add stripfc tool 2020-04-04 10:27:21 -04:00
Virgil Dupras
41cefb7460 Extract EMIT-dependent routines from core 2020-04-04 08:08:45 -04:00
Virgil Dupras
80891d7ec1 Add in-memory bootstrapping system
This should help with the bootstrapping of non-emulated environment.
For example, I have a problem with the RC2014: I can't send it
bootstrap info until the ACIA is up. I need to find a way...
2020-04-03 20:13:11 -04:00
Virgil Dupras
9235fa9223 Add /tools/slatest
To update LATEST offset more easily. Will be useful for recipes.
2020-04-02 23:20:47 -04:00
Virgil Dupras
941791d609 forth: remove RAMSTART and RS_ADDR from stable ABI 2020-04-02 11:39:40 -04:00
Virgil Dupras
2481ed4b66 forth: remove dummy.fs
All "stop pings" are now explicitly made at appropriate places. This
fixes a problem I've introduced in the last commit where RAM+ was
unexpectedly part of a stable ABI because of "HERE" usage in dummy.fs.

This system will, anyways, soon change because boot.bin and z80c.bin
will be built during the same process (but there's a bit of retooling
to do before I get there).
2020-04-02 11:29:23 -04:00
Virgil Dupras
d0c5d3a741 Forth self-bootstraps!!!
This commit cuts Forth's dependency on zasm. It now self-assembles
its own boot-binary! Things are a bit messy now, I'll clean up
later.
2020-04-01 22:19:37 -04:00
Virgil Dupras
e846d07238 forth: simplify build process
Make LATEST configurable through a value in the binary instead of through
a ZASM constant. This enables the simple concatenation of compiled dicts and
simplifies the build process.
2020-04-01 08:54:01 -04:00
Virgil Dupras
dad0081123 forth: Forth-ify "INTERPRET"!!!
Now we're seriously getting into real boostrapping territory...
2020-03-27 08:23:45 -04:00
Virgil Dupras
636407969d forth: Forth-ify "(emit)" 2020-03-26 12:05:48 -04:00
Virgil Dupras
c2d8fc845d forth: bring ." and ABORT" down to core.fs level 2020-03-25 20:39:07 -04:00
Virgil Dupras
f0ab57c8cc forth: Forth-ify "AND" 2020-03-24 22:09:52 -04:00
Virgil Dupras
6c5f39806b forth: improve bootstrap process 2020-03-24 21:13:02 -04:00
Virgil Dupras
67c55b0b2f forth: Forth-ify ROT, a native word!
This requires us to significantly adjust our build process, which
now has 3 stages.
2020-03-24 13:46:05 -04:00
Virgil Dupras
5387e08437 forth: make bin staging process a bit less hackish
The goal being to add a new native code dict staging phase.
2020-03-22 21:46:43 -04:00
Virgil Dupras
ffe61a12f8 forth: make prev word field relative
This should help with upcoming challenges in bootstrapping z80 code
compiled through Forth.
2020-03-22 17:41:59 -04:00
Virgil Dupras
33e47d4938 forth: begin z80 assembler 2020-03-21 21:23:13 -04:00
Virgil Dupras
f4b969986d forth: Forth-ify "."" 2020-03-21 17:21:01 -04:00
Virgil Dupras
c1ece95089 forth: implement readline in Forth
The commit ended up being much bigger than anticipated. This was a long thread
of underlying complexities. This lead to the creation of interesting concepts
such as (sysv).
2020-03-21 12:57:49 -04:00
Virgil Dupras
b335e538b4 Move "forth" folder to project's root folder
It's not really an App.
2020-03-18 22:25:44 -04:00
Virgil Dupras
548facac0b forth: Implement "(parseh)" 2020-03-18 21:52:55 -04:00
Virgil Dupras
1df9c4fc1b forth: split forth source into multiple files 2020-03-17 21:44:32 -04:00
Virgil Dupras
f404c2f4d0 forth: TIL forth source file extension is "fs" 2020-03-16 19:51:10 -04:00
Virgil Dupras
c3838714d5 forth: improve execution model
My approach with RS was slightly wrong: RS' TOP was always containing current
IP. It worked, but it was problematic when came the time to introduce
RS-modifying words: it's impossible to modify RS in a word without immediately
messing your flow.

Therefore, what used to be RS' TOS has to be a variable that isn't changed
midway by RS-modifying words. I guess that's why RS is called *return* stack...
2020-03-13 16:01:09 -04:00
Virgil Dupras
a8e573c84a forth: add bin dict compilation stage!
Big one.

This allows us to write higher order words directly in Forth, which is much
more convenient than writing post-immediate (see "NOT" structure in diff if
you want to see what I mean) structures in ASM.

These structures can then be written to ROM (rather than loaded in RAM for
definitions loaded at run-time).

That's quite a bit of tooling that was added, 2 compilations stages, but I
think it's well worth it.
2020-03-12 00:14:44 -04:00
Virgil Dupras
e95614755b emul: add forth target 2020-03-09 22:26:02 -04:00
Virgil Dupras
49228e418c apps/forth: new (WIP) application 2020-03-07 12:13:15 -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
4cde58fd83 cfspack: make into a library
Use it in shell instead of using popen()
2019-12-31 13:57:52 -05:00
Virgil Dupras
72357fec86 Move "emul" folder to root 2019-12-31 13:34:24 -05:00