Virgil Dupras
abafd6d67b
ti84: fix glitches
2020-05-09 15:31:41 -04:00
Virgil Dupras
e06d6c5345
ti84: we have a prompt
2020-05-09 14:28:55 -04:00
Virgil Dupras
4ce0727c72
ti84: kbd driver wip
2020-05-09 11:55:58 -04:00
Virgil Dupras
2f1e635b9d
ti84: tidy up driver code
...
Pushed all words directly interfacing with ports and memory offsets to
low level layers. This saves us the need for keeping those variables in
runtime memory.
2020-05-09 08:50:55 -04:00
Virgil Dupras
b2d71cb1ee
ti84: add Z offset mechanism
2020-05-09 08:13:49 -04:00
Virgil Dupras
afc2327770
Split icore in 2 parts
...
The goal is to insert device drivers in between.
2020-05-08 21:47:03 -04:00
Virgil Dupras
baf725aa38
Move a bunch of words from core to inner core
...
That makes it easier to write drivers that can be xcompiled.
2020-05-08 20:55:50 -04:00
Virgil Dupras
ffdc58739a
ti84: HelloWorld!
...
In emulator of course...
2020-05-08 11:36:50 -04:00
Virgil Dupras
b90efb0f7f
ti84: first glyph on screen!
...
On the emulator of course...
2020-05-08 09:07:44 -04:00
Virgil Dupras
58ec54fc97
ti84: wip
...
Gave more priority to CPU in the emulator because initialization would
otherwise be horrendously slow.
2020-05-08 07:56:34 -04:00
Virgil Dupras
114e753b64
ti84: WIP
2020-05-08 06:50:34 -04:00
Virgil Dupras
24e588019b
Add words RSHIFT and LSHIFT
2020-05-07 15:41:43 -04:00
Virgil Dupras
4e98ef11bd
ti-84+: wip
...
I need RSHIFT and LSHIFT first...
2020-05-07 15:08:42 -04:00
Virgil Dupras
f2f3474698
Begin copying fonts (and compiler) to blk
2020-05-07 12:09:52 -04:00
Virgil Dupras
be66d7b4a2
editor: implement E
2020-05-07 08:44:17 -04:00
Virgil Dupras
204a9c69f8
editor: fix PSP leak in F
2020-05-07 08:38:57 -04:00
Virgil Dupras
feb0411530
editor: simplify I with the use of MOVE-
...
Also, delay the shadowing of DO..LOOP's I for as long as possible.
2020-05-06 21:10:27 -04:00
Virgil Dupras
eaeb138a0c
Add words C@- C!- and MOVE-
2020-05-06 20:37:08 -04:00
Virgil Dupras
690d9e6313
editor: improve I
...
Make it print edited line and also have it adjust cursor pos.
2020-05-06 17:41:49 -04:00
Virgil Dupras
58ece9f9a1
editor: implement I command
...
Also, made LIST properly handle full 64-chars lines not ending with
a null or CR. Previously, such a line would be accompanied by its
following line, duplicating that line's output.
2020-05-06 12:19:36 -04:00
Virgil Dupras
f54b1dc504
Add 2>R and 2R>
...
This allows us to make DO..LOOP more compact.
2020-05-06 09:55:05 -04:00
Virgil Dupras
b89fa2981f
recipes/trs80: move RECV program to blkfs
2020-05-05 22:21:27 -04:00
Virgil Dupras
60b4bbf28a
Fix DUMP's broken "round up to next 8" logic
...
This was caused by the removal of signed-ness a long while ago.
2020-05-05 22:09:11 -04:00
Virgil Dupras
9df053b76c
z80a: add CPn,
2020-05-05 21:49:26 -04:00
Virgil Dupras
fa79e3d8a6
Make (print) stop on CR
...
Lines edited with the Block editor end with 0xd and (print) spits
spurious CR when printing those lines.
Also, properly initialize ACC in BROWSE.
2020-05-05 15:49:50 -04:00
Virgil Dupras
c681cb639d
Add words >< and =><=
2020-05-04 22:30:29 -04:00
Virgil Dupras
c494917452
blk: Add LOAD+ and LOADR+
...
And use them in all places they make sense.
2020-05-04 21:43:48 -04:00
Virgil Dupras
3c2e0dd9df
Add usage guide section about disk blocks
2020-05-04 20:37:40 -04:00
Virgil Dupras
24e9fa0c30
Add word NL
2020-05-04 08:10:18 -04:00
Virgil Dupras
a3c3a2f44a
Remove unused DELW
2020-05-03 20:36:35 -04:00
Virgil Dupras
8ef197d248
Make linker more compact
...
There was a weird empty block in the middle of the program.
2020-05-03 20:33:36 -04:00
Virgil Dupras
a96b5f1dec
Restore DOES> section in usage guide
...
I removed it because it was redundant with Starting Forth, but
I directly reference it in the dictionary, so well...
2020-05-03 20:24:54 -04:00
Virgil Dupras
e375562a9f
Revamp dictionary's glossary
2020-05-03 20:18:34 -04:00
Virgil Dupras
df242bb9eb
Revamp usage guide a bit
2020-05-03 19:24:41 -04:00
Virgil Dupras
f023f9bcb4
Pack core words blks a bit tighter
...
With all this recent movements, we had a bit of a fragmentation
issue.
2020-05-02 21:47:32 -04:00
Virgil Dupras
3373f53997
tidy up blk and fix tests
2020-05-02 21:25:35 -04:00
Virgil Dupras
3d908cef3a
Move all parsing words to Inner core
...
This allows us to get rid of the (parse*) indirection.
2020-05-02 21:21:47 -04:00
Virgil Dupras
8009270e79
Optimize parsing words
2020-05-02 20:32:20 -04:00
Virgil Dupras
931c812394
Remove cmp
...
Not worth the complexity and space.
2020-05-02 19:57:56 -04:00
Virgil Dupras
0b3a328e65
Add a layer of indirection for KEY
2020-05-02 11:17:28 -04:00
Virgil Dupras
446a58006d
Remove one of the 2 indirection layers for EMIT
...
2 was overkill
2020-05-02 10:26:34 -04:00
Virgil Dupras
443ed754e9
trs80: add missing blk
2020-05-02 08:27:24 -04:00
Virgil Dupras
3a27479f2b
fix stupid typo
...
I don't believe this, one hour of my life I'll never get back.
2020-05-02 08:06:37 -04:00
Virgil Dupras
b8d8007a3f
trs80: add *CL< and *CL>
2020-05-02 06:20:03 -04:00
Virgil Dupras
2a578b3352
editor: implement F
2020-05-01 21:52:38 -04:00
Virgil Dupras
ecca70c7f3
Add layer of indirection to EMIT
...
This would allow things like temporary giving control to the *CL
line on the TRS-80. For example... A very far fetched example. Not
at all the only *raison d'etre* of the layer...
2020-05-01 20:05:15 -04:00
Virgil Dupras
5bf3baff05
editor: add edit buffer
...
Also, add word "C!+" and fix PSP leak in FILL.
2020-05-01 13:17:40 -04:00
Virgil Dupras
792c781614
editor: add cursor pos tracking and display
2020-04-30 20:42:07 -04:00
Virgil Dupras
07f807edee
recipes/trs80: making progress on floppy drivers
2020-04-30 16:10:35 -04:00
Virgil Dupras
65f359bda4
recipes/trs80: can write compiled version to floppy
2020-04-30 11:13:25 -04:00
Virgil Dupras
f38de1c151
Introduce the notion of Extra words
2020-04-29 21:52:18 -04:00
Virgil Dupras
0044011f06
Move AT28 and TRS80 drivers to higher blocknos
...
I'm reserving the 100-200 range for non-bootstrapping needs.
2020-04-29 21:04:10 -04:00
Virgil Dupras
0cf26547ff
Add words FLUSH and COPY
2020-04-29 20:21:18 -04:00
Virgil Dupras
1b2c4b519e
icore: add BIN+
...
This allows us to write LATEST at proper offset in emul/stage1.fs in
cases where we set a nonzero BIN(.
2020-04-29 11:42:09 -04:00
Virgil Dupras
fc67b88720
Make BIN( offsetted binaries closer to working at all
...
I have a working offset-by-0x100 stage0 now.
2020-04-28 21:12:52 -04:00
Virgil Dupras
0b8c8c9ca0
recipes/trs80: still wip...
2020-04-28 10:12:16 -04:00
Virgil Dupras
61b2e02351
xcomp: remove XOFF and use ORG and BIN( instead
2020-04-28 09:37:00 -04:00
Virgil Dupras
838548843e
boot: apply BIN( to stray stable ABI references
...
With cross compiling and IMMEDIATE words, things get icky with stable
ABI references. For the same reason that EXIT, (br) and (br?) need to
stay at stable offsets, these word references will not have BIN(
properly applied at Inner core xcomp.
The solution for now is to adjust during EXECUTE, which is ugly and
inefficient, but I don't see a better solution right now.
2020-04-28 08:52:47 -04:00
Virgil Dupras
4501313410
Add [IF] .. [THEN]
...
Will be useful as kinds of "#ifdef"s during xcomp.
2020-04-28 08:28:59 -04:00
Virgil Dupras
f97df4614e
recipes/trs80: wip
2020-04-28 07:51:41 -04:00
Virgil Dupras
b8ea515612
Add word WIPE
2020-04-27 21:28:34 -04:00
Virgil Dupras
2b2ccad96c
Add word FILL
2020-04-27 21:22:06 -04:00
Virgil Dupras
f605e2d85c
Give CASE's default branch access to its input value
...
ref #97
2020-04-27 20:44:21 -04:00
Virgil Dupras
3b66aefcd1
block editor: fix broken B and N
...
fixes #97
2020-04-27 18:11:54 -04:00
Virgil Dupras
295b4b6e0a
z80a: add BIN( parameter
...
Will be useful for assembling binaries for the TRS-80 which can't start
at addr 0.
2020-04-27 15:11:38 -04:00
Virgil Dupras
865f4f9256
Move AT28 driver to blkfs
...
And adjust rc2014/eeprom recipe
2020-04-26 15:18:28 -04:00
Virgil Dupras
dee7eea497
Move link.fs to blkfs
2020-04-26 14:37:54 -04:00
Virgil Dupras
4d8574c1fe
recipe/rc2014: use core libs from blkfs
2020-04-26 13:57:44 -04:00
Virgil Dupras
a2f164ecc3
emul: bootstrap to stage2 from within Collapse OS!
...
Big bootstrapping change which greatly reduces the role of the modern
operating system in the bootstrapping process.
2020-04-26 10:24:09 -04:00
Virgil Dupras
0e3cf7fa02
Add word ,"
2020-04-26 09:01:49 -04:00
Virgil Dupras
6f896caf7a
Copy core words to blkfs
2020-04-25 21:54:07 -04:00
Virgil Dupras
13771d8c92
xcomp: add XPACK
2020-04-25 16:02:47 -04:00
Virgil Dupras
389b23fe1a
Change C<? mechanic
...
It's now a simple flag updated by the C< implementation. No more
routine pointer.
The goal is to avoid tons of "ok" during a LOAD operation.
2020-04-25 09:10:25 -04:00
Virgil Dupras
5219887ad7
sdc: implement _crc16 in z80
2020-04-24 20:46:01 -04:00
Virgil Dupras
8d78ca9dac
tests: add test_sdc
...
The SD card driver is a bit too slow to be bearable. I'll write
_crc16 in z80 and see how it goes.
2020-04-24 18:23:29 -04:00
Virgil Dupras
816563e2e3
Stop LOADing on ABORT
...
This is done by adding a "C<* override" layer that is reset to 0 on
ABORT.
The problem was that when ABORT happened during a LOAD, we had a
resetted RSP and started from a clean INTERPRET, but LOAD didn't
have the opportunity to restore C<*, which caused it to continue
interpreting from the faulty BLK.
With a C<* override, we don't need to *restore* C<*, we just need to
clear the override.
2020-04-24 14:10:40 -04:00
Virgil Dupras
af39b37dd1
Replace the "> " prompt with the more traditional "ok" one
...
This is more than cosmetic, it's also highly usable. The presence
or absence of the "ok" message allows us to know whether the command
aborted. Previously, the "> " prompt appeared when the system expected
a prompt in the INTERPRET context, whether the previous command aborted
or not.
Also, this allows us to get rid of that ugly FLAGS global variable.
2020-04-24 12:10:07 -04:00
Virgil Dupras
44403c3d4c
Move icore to blkfs
...
The way is clear for complete stage1 bootstrapping on the RC2014
target!
2020-04-23 15:14:14 -04:00
Virgil Dupras
8fbbf5209a
Copy sdc driver to blkfs
2020-04-23 13:55:00 -04:00
Virgil Dupras
a19376df6c
Copy ACIA driver to blkfs
...
We can get rid of acia.z80, but not of acia.fs yet, we still need it.
2020-04-23 12:42:41 -04:00
Virgil Dupras
503dbe9a2c
Copy boot.z80 to blkfs
2020-04-22 21:19:12 -04:00
Virgil Dupras
338769a0a8
z80a: add PUSH0, PUSH1, PUSHZ, macros
2020-04-22 19:03:32 -04:00
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
446ce574cd
Add words "'S" and "S0"
2020-04-21 07:45:23 -04:00
Virgil Dupras
0438cb92fe
Add word "ROLL"
2020-04-20 23:06:39 -04:00
Virgil Dupras
2de1eabaa6
z80a: add LDIR, LDDR, and friends
2020-04-20 21:36:29 -04:00
Virgil Dupras
41ed70f8cb
z80c: Add word "PICK"
2020-04-20 21:22:07 -04:00
Virgil Dupras
58c017448f
z80a: add JPccnn,
2020-04-20 21:18:33 -04:00
Virgil Dupras
d466c6d95d
emul: make stage2 load z80a from blkfs
...
This allows us to remove forth/z80a.fs. Another big step towards
self-hosting!
2020-04-19 21:31:41 -04:00
Virgil Dupras
0892193cbe
Copy z80a.fs to disk blocks
...
I don't remove z80a.fs yet because build process needs it, but that
will change shortly.
2020-04-19 20:36:13 -04:00
Virgil Dupras
f3c92684a0
link: improve reliability by never relinking last word
...
It's not possible to reliably determine its end and with some memory
initialization scenarios, it makes RLDICT fail.
2020-04-18 16:51:48 -04:00
Virgil Dupras
b062a9092a
parse: use "0<" instead of "0 <"
...
As I wrote in my "Clarify signed-ness" commit, "0 <" is broken.
Also, made this unit a bit more compact. The RC2014 stage1 can
really use some breathing room...
2020-04-18 09:18:09 -04:00
Virgil Dupras
66f65daa08
Add word LEAVE
2020-04-18 08:37:57 -04:00
Virgil Dupras
2cadae260d
editor: add "U" word
2020-04-17 07:51:59 -04:00
Virgil Dupras
9edab10a3a
blk: add dirty flag and auto write blocks on fetch
...
Also, fix some PSP leaks related to LOAD.
2020-04-16 20:59:20 -04:00
Virgil Dupras
79ce88c12c
tools: add blkunpack
...
and remove cfspack, which will not ever be used again.
2020-04-16 19:44:17 -04:00
Virgil Dupras
5cb4a7de9a
Add word "C@+"
2020-04-16 18:58:11 -04:00
Virgil Dupras
57e20f0532
Block explorer upgraded to block editor!
2020-04-16 15:59:43 -04:00
Virgil Dupras
5067d40e3b
Add CASE..OF words
2020-04-16 15:07:31 -04:00
Virgil Dupras
4eca827d36
First function application: Block explorer!
2020-04-15 22:39:14 -04:00
Virgil Dupras
5d4155aa32
Add words 1+ 2+ 1- 2- and consts 0 1 -1
...
Saves quite a few bytes in the final binary.
2020-04-15 21:29:39 -04:00
Virgil Dupras
0750e8d0c0
Use IY for IP instead of RAM+06
2020-04-15 17:01:15 -04:00
Virgil Dupras
d8de8a058a
Make word routine refs 1b instead of 2
...
Saves quite a bit of binary space. More than 300 bytes in forth1.bin
2020-04-15 15:16:11 -04:00
Virgil Dupras
22f132094a
Clarify signed-ness
...
And fix broken negative display in ".".
2020-04-15 12:29:47 -04:00
Virgil Dupras
2439f1ed86
Change SCMP for S=
...
Remove flagsToBC boot routine.
2020-04-15 12:19:58 -04:00
Virgil Dupras
415bd7a169
Support nested LOAD
2020-04-14 21:04:07 -04:00
Virgil Dupras
aec19e5c87
Add word "LOAD"
2020-04-14 18:15:07 -04:00
Virgil Dupras
a67101fb8b
Add word "EMPTY"
2020-04-14 16:07:07 -04:00
Virgil Dupras
b8dd86bd18
Move notes.txt in blk
2020-04-14 14:54:42 -04:00
Virgil Dupras
1efb2821e3
Make usage and dictionary documentation in-system
2020-04-14 10:04:09 -04:00
Virgil Dupras
d4cdb659b4
tools: add blkpack
2020-04-13 22:05:03 -04:00