1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-20 22:18:06 +11:00
Commit Graph

887 Commits

Author SHA1 Message Date
Virgil Dupras
ae470397d7 emul/hw/rc2014: add sdc emulator (wip)
so far, it goes through initialization with the rc2014/sdcard recipe.
2020-04-17 15:11:32 -04:00
Virgil Dupras
e37f4c2551 bin2c: add missing stdtypes.h 2020-04-07 18:13:42 -04:00
Byron A. Grobe
217df20d77
Moved tools/bin2c to single-level with other tools. 2020-04-07 16:56:55 -05: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
b162ef84f5 forth: fix broken RAM+ 2020-04-02 13:42:49 -04:00
Virgil Dupras
e284081c79 forth: fix readln overflow handling
It was badly handled.
2020-04-02 13:40:22 -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
68a7be3707 forth: Remove RAM offsets from stable ABI
Doing this was a bit stupid. These offsets are constants. Moreover,
having them in stable ABI had us construct the boot binary from the
stable ABI of the host, making it very difficult to change RAMSTART
for a new system.
2020-04-02 10:20:51 -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
b7244f8985 forth: shrink forth.asm's binary size 2020-03-31 22:11:44 -04:00
Virgil Dupras
1e85d60d89 forth: Forth-ify "," 2020-03-31 16:32:50 -04:00
Virgil Dupras
7d5b1f5cea forth: Forth-ify parseDecimal 2020-03-31 15:04:28 -04:00
Virgil Dupras
25814c0b8b forth: add label system to z80 assembler 2020-03-31 09:23:00 -04:00
Virgil Dupras
ce6e31dda1 forth: inline "strcmp" 2020-03-31 08:02:40 -04:00
Virgil Dupras
031bfc6d72 forth: setup SYSVNXT in Forth code 2020-03-30 21:48:56 -04:00
Virgil Dupras
e5ab0dd1c9 forth: a little bit of ASM routine inlining 2020-03-30 21:33:37 -04:00
Virgil Dupras
5c03b33982 forth: remove sysvarWord type
Not needed anymore. CONSTANT does the trick.
2020-03-30 21:19:48 -04:00
Virgil Dupras
05045b2aa4 forth: move stable ABI stuff at the top of forth.asm
Now we're having a real nice and tidy forth.asm...
2020-03-30 21:02:19 -04:00
Virgil Dupras
f366732424 forth: Forth-ify "DOES>" 2020-03-30 20:01:59 -04:00
Virgil Dupras
36e200adbb forth: Forth-ify "SCPY" 2020-03-30 17:59:30 -04:00
Virgil Dupras
5b01f797fc forth: Forth-ify "(find)" 2020-03-30 17:36:15 -04:00
Virgil Dupras
de3da19333 forth: Forth-ify "NOT" 2020-03-30 17:26:51 -04:00
Virgil Dupras
4756fb7763 forth: Forth-ify "(parsed)" 2020-03-30 17:21:13 -04:00
Virgil Dupras
80985460d4 forth: remove JTBL
We refer to stable offset as direct numbers instead of offset to JTBL.
Simpler that way.
2020-03-30 17:05:00 -04:00
Virgil Dupras
61195a987d forth: Forth-ify "HERE", "CURRENT" and "JTBL" 2020-03-30 15:11:23 -04:00
Virgil Dupras
a9cf861cfd forth: Forth-ify "(parse*)" 2020-03-30 14:49:20 -04:00
Virgil Dupras
f9d45f7f53 forth: Forth-ify "FLAGS" 2020-03-30 14:29:21 -04:00
Virgil Dupras
e984efe6c3 forth: Forth-ify SYSVNXT 2020-03-30 14:19:47 -04:00
Virgil Dupras
162ff2c5cb forth: Forth-ify "!" 2020-03-30 14:09:39 -04:00
Virgil Dupras
8ef9e7d0da forth: Forth-ify "@" 2020-03-30 14:05:07 -04:00
Virgil Dupras
f9c3a0444c forth: Forth-ify "DROP" 2020-03-30 13:57:06 -04:00
Virgil Dupras
49994f09ce forth: add word "2DROP" 2020-03-30 13:54:46 -04:00
Virgil Dupras
8186511727 forth: fix bootstrapping issues with "LITN" and "+" 2020-03-30 13:50:53 -04:00
Virgil Dupras
395eb04fac forth: Forth-ify "C<" 2020-03-30 08:37:33 -04:00
Virgil Dupras
f6cba4b1cf forth: Forth-ify "QUIT" 2020-03-30 08:25:22 -04:00
Virgil Dupras
da9f9f9899 forth: melt boot binary 2020-03-30 08:11:16 -04:00
Virgil Dupras
d09ec0d757 forth: Forth-ify "SWAP" 2020-03-30 08:06:11 -04:00
Virgil Dupras
cc4700e389 forth: Forth-ify "DUP" 2020-03-30 08:02:20 -04:00
Virgil Dupras
09cd25df29 forth: Forth-ify "OVER" 2020-03-30 07:58:16 -04:00
Virgil Dupras
9cfddea940 forth: Forth-ify "+" 2020-03-30 07:54:45 -04:00
Virgil Dupras
a2c258afba forth: Forth-ify "CMP"
forth.asm under 1K lines!
2020-03-30 07:52:24 -04:00
Virgil Dupras
7c9d799d93 forth: Forth-ify "SCMP" 2020-03-30 07:48:07 -04:00
Virgil Dupras
400ef99b54 forth: fix dumb bug in (?br)
inc (hl) is 8 bit, inc (hl) is 8 bit, inc (hl) is 8 bit. Now I hope
I'll remember...
2020-03-29 22:17:25 -04:00
Virgil Dupras
d2dcd96ce1 emul: add useful emul_trace() debugging tool 2020-03-29 22:13:54 -04:00
Virgil Dupras
48078d9c9c forth: Replace "SKIP?" with "(?br)"
There is an alternate git history where I continued the Forth-ification of
words, including "SKIP?", but that was a bad idea: because that word was
written by flow control immediates, I stepped into quicksands where stability
became necessary in z80c.fs and I couldn't gracefully get out of it.

I'm stepping back and take this opportunity to replace the shoddy SKIP? algo
with a more straightforward (?br) implementation.

(br) and (?br) will always stay in boot code where it's easier manage a stable
ABI.
2020-03-29 09:10:23 -04:00
Virgil Dupras
9fcfebd84c forth: Forth-ify "WS?" 2020-03-28 13:18:43 -04:00
Virgil Dupras
a17da42021 forth: remove unused (fbr) and (bbr) 2020-03-28 13:12:07 -04:00
Virgil Dupras
c1693c6256 forth: Forth-ify "TOWORD" 2020-03-28 13:02:04 -04:00