1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-15 04:48:06 +11:00
Commit Graph

393 Commits

Author SHA1 Message Date
Virgil Dupras
66412a1c30 forth: Forth-ify "XOR" 2020-03-25 17:24:46 -04:00
Virgil Dupras
1871f7cdb4 forth: Forth-ify "OR" 2020-03-25 17:19:47 -04:00
Virgil Dupras
eb6a07a162 forth: Forth-ify "PC@" 2020-03-25 17:13:10 -04:00
Virgil Dupras
7beac94b5a forth: Forth-ify "PC!" 2020-03-25 17:07:15 -04:00
Virgil Dupras
3a08fa7e74 forth: add a stable ABI 2020-03-24 23:02:06 -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
d6516e2122 forth: Forth-ify "2*" stack management words 2020-03-24 14:44:10 -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
cf95bbcace forth: inline kernel/stdio 2020-03-19 17:26:45 -04:00
Virgil Dupras
6134694513 forth: put all ASM code in the same file 2020-03-19 17:01:15 -04:00
Virgil Dupras
f0cbda1f2e tests: add Forth tests
Modest first step
2020-03-19 15:43:48 -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
ae6334906c forth: inline kernel's core and str units 2020-03-18 22:18:07 -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
549cf74e9d forth: inline code from "apps/lib"
Forth-ification of Collapse OS goes forward. What will happen is that assembly
code in apps/ will become Forth code. The concept of an assembler code library
will become obsolete.

However, Forth's core use some of that code. To facilitate the transition, I'm
inlining that code directly in Forth's code.
2020-03-17 12:49:06 -04:00
Virgil Dupras
017a469d9c forth: Forth-ify "." 2020-03-17 12:26:28 -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
abdf2c8adc emul/forth: allow running commands from file 2020-03-11 19:03:47 -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
a442c46935 sms/vdp: highlight cursor with inverted palette 2020-02-26 09:43:50 -05:00
Virgil Dupras
247b200dcc New kernel module: grid 2020-02-24 20:36:08 -05:00
Virgil Dupras
6224ea2fe9 zasm: use printcrlf instead of hardcoded CRLF 2020-02-23 18:52:25 -05:00
Virgil Dupras
0f2b3aca24 zasm: allow zasm to omit its 3rd argument
A bug in rdWS made zasm error out when omiting its 3rd argument.

fixes #90
2020-02-18 15:46:55 -05:00
Virgil Dupras
e1e0676191 emul/hw/sms: add A/B ports and a Genesis pad
This makes the emulator suitable to run the base SMS recipe.
2020-01-10 21:20:44 -05:00
Virgil Dupras
b60252e330 emul/hw/(ti|sms): detect window being closed
Previously, it would never get out of the event loop.
2020-01-10 16:59:48 -05:00
Virgil Dupras
66744c0026 emul/hw/(ti|sms): fix compilation with gcc
It seems to be picky about where it accepts its link flags.
2020-01-09 08:36:29 -05:00
Virgil Dupras
6acd22492c emul/hw/sms: WIP
VDP kinda works. Can see the Collapse OS prompt with SMS base recipe
if `STDIO_GETC` gets replaced with infinite loop (no input emul yet).
2020-01-08 22:06:50 -05:00
Virgil Dupras
c7ef8bf915 recipes: add "make emul" targets where appropriate 2020-01-02 16:59:38 -05:00
Virgil Dupras
9216057db8 emul/hw: add TI-84+ emulator
I implement the screen using XCB which is much more friendly
than z80e's SDL+CMake for development machines that want to install
minimal dependencies (for example, a port-less OpenBSD rig).
2020-01-01 22:48:01 -05:00
Virgil Dupras
25fc0a3c72 Add RC2014 classic emulation 2019-12-31 22:03:48 -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