Virgil Dupras
6a6c59300e
VE: make ACC reset after each non-digit keystrokes
...
It simplifies things. Also, removed ';' which became useless.
2020-06-10 16:54:36 -04:00
Virgil Dupras
c16c5c98ce
Improve usage docs
2020-06-09 22:55:42 -04:00
Virgil Dupras
1adfd0c1a6
ed: make X and E cut to IBUF
...
This allows cut&paste similar to VI's
2020-06-09 22:09:15 -04:00
Virgil Dupras
f90e03b0cb
ed: free some blocks for the docs
2020-06-09 21:48:49 -04:00
Virgil Dupras
64ce8ab3e9
ed: Improve F with repeated searches
...
Make F search from curpos+1 so that it's possible to search the
same word we've just found a second time. Previously, it would find
the word under the cursor.
Also, improve docs a bit.
2020-06-09 21:17:08 -04:00
Virgil Dupras
4d893d90fc
VE: Improve I and F buffer typing
...
Previously, it would keep the old buffer displayed why typing over
it. I had kept it thus because I didn't want to erase the buffer
right away because the behavior is that when we type nothing, we
keep the buffer as-is and repeat the action.
Now, the behavior of I and F is much better. It keeps the buffer
displayed until the first non-return keystroke and then erases it.
Also, fixed PSP leak in _type and fixed PSP overuse in successful
_F (they balanced out).
2020-06-08 21:23:23 -04:00
Virgil Dupras
a36db99651
VE: properly initialize variables
...
This fixes weird glitches I had on trs80. It's *always* a matter of
RAM initialization. By now, I should know...
2020-06-07 16:16:07 -04:00
Virgil Dupras
b2b556911f
trs80: implement AT-XY
...
Also, I've run VE on the TRS-80 for the first time! It doesn't work
well though. Screen is mostly blank all the time.
I removed instructions from the recipe which became obsolete when
Collapse OS became 100% bootstrapped. Also, I've updated instructions
to change the NL override which is necessary for blkup to work.
2020-06-07 11:14:57 -04:00
Virgil Dupras
ab76d8d648
VE: add 'D'
2020-06-07 09:30:31 -04:00
Virgil Dupras
15acf30ca3
VE: add 'o' and 'O'
2020-06-07 07:25:02 -04:00
Virgil Dupras
c6016cd429
VE: fix buffer overflow with 'f' and make 'H' and 'L' affect 'f'
2020-06-06 21:59:22 -04:00
Virgil Dupras
b22ab8437b
VE: add command 'f'
...
Kinda proud of this one. Efficiently piggy-backing on the Block
Editor, keeping things simple, and yet, building power into the
editor.
2020-06-06 21:46:46 -04:00
Virgil Dupras
204a66277e
VE: replace 'W' with 'b' and implement 'W' and 'B'
...
Which are end-of-word movements.
2020-06-06 21:01:35 -04:00
Virgil Dupras
9d4e9ef08d
VE: Add X
2020-06-05 14:01:39 -04:00
Virgil Dupras
6212a08866
VE: Add F and E
2020-06-05 13:54:45 -04:00
Virgil Dupras
a1b99275e6
VE: Add replace mode
2020-06-05 11:01:26 -04:00
Virgil Dupras
e7a6c777c7
VE: refactor mode indicators
...
The indicator is going to be empty most of the time and will be
emitted by the mode changer directly. That's going to the upper-right
corner and the status bar avoids emitting in that area.
2020-06-05 10:38:05 -04:00
Virgil Dupras
4af93d53e3
VE: add I command
...
Also, add insert and find buffers to the header, making it 3 lines
high.
Also, fix the "I" overshadowing word which wasn't operating on the
proper RSP level.
Also, fix I which didn't mark the block as dirty.
2020-06-04 22:54:27 -04:00
Virgil Dupras
e36080d7b8
VE: load Block Editor and reuse some of its words
2020-06-04 20:20:35 -04:00
Virgil Dupras
297c187426
VE: add mode indicator in status bar
2020-06-04 20:07:02 -04:00
Virgil Dupras
2bf4db59ed
VE: Add H and L
...
Also, add MODE indirection.
2020-06-04 19:20:40 -04:00
Virgil Dupras
878df2d53b
VE: make w affected by modifier
2020-06-04 18:59:54 -04:00
Virgil Dupras
98e820cf51
WE: why case-insensitive again?
2020-06-04 18:52:59 -04:00
Virgil Dupras
11843cc613
VE: add W and S movements
2020-06-04 17:22:07 -04:00
Virgil Dupras
77aedd7338
VE: add H, J, K, L
2020-06-04 12:04:13 -04:00
Virgil Dupras
c07a594e1a
Begin working on a Visual Editor
2020-06-04 10:39:59 -04:00
Virgil Dupras
f53f91558b
find: don't protect BC
...
not needed
2020-06-03 20:57:29 -04:00
Virgil Dupras
c26c454cbf
extra words: allow finer-grained loading
2020-06-03 20:28:18 -04:00
Virgil Dupras
d8a6456206
(parsed): fix crash on parsing non-decimal staring with '-'
...
The address returned in the error condition would be off by one.
2020-05-25 21:15:07 -04:00
Virgil Dupras
2d17b4e8ec
Make string length-prefixed instead of null-terminated
...
I'm not sure why I chose null-terminated initially. Probably because
the z80asm version had null-terminated strings.
Length-prefixes strings are the traditional form of strings in Forth
and it's a bit easier to work with them with traditional forth words
when they're under this form.
2020-05-25 20:34:52 -04:00
Virgil Dupras
6a507bcaac
Add word MOVE,
2020-05-24 19:55:00 -04:00
Virgil Dupras
2d2a846b25
Inline SCPY
...
I'm planning a string reform and it's standing in the way.
2020-05-24 14:19:25 -04:00
Virgil Dupras
a59322c252
Remove XPACK
...
Now that everything is cross-compiled, no need to XPACK. If we ever
need it again, we know where to find it.
2020-05-24 13:45:22 -04:00
Virgil Dupras
4c1cacd8d0
Remove Linker
...
Now that the boot binary is fully cross-compiled, there's no use for
the linker anymore. Theoretically, it could still be useful, but I
can't think of a real use case.
Let's take it out of the picture. If it's ever needed again, I'll
know where to find it.
2020-05-24 10:22:56 -04:00
Virgil Dupras
ed2b91411a
Limit ourselves to 8-bit branching
...
I'm planning on going back to 8-bit branching. 16-bit br cells incur
a non-negligible penalty and, while at first 64 words (128 bytes
forward or backward) seemed a bit limiting, I now don't see why one
would ever construct such a big branch. It would be un-forthy.
Also, I looked at using BC instead of IY to hold IP and the transition
would be a lot easier with 8-bit branching.
In this commit, all I do is add overflow checks in IF. The mechanic
below doesn't change. I'll give myself some time to think it over so
that I avoid yet another back and forth.
2020-05-24 10:16:25 -04:00
Virgil Dupras
5bbc256faf
Flush input buffer on QUIT
...
Prebiously, when encountering an error during a : ; definition from
input buffer, because the input buffer wasn't flushed, we would continue
interpreting and quit the whole program when encountering ;.
2020-05-24 09:23:19 -04:00
Virgil Dupras
d041b91846
Optimize chkPS
...
Use EXX instead of the stack for HL protection and remove all
spurious uses of chkPS,
I wanted to inline chkPS in next because of its "tight loop" status,
but for reasons I don't understand, doing so breaks Collapse OS.
Later...
2020-05-22 23:12:03 -04:00
Virgil Dupras
4f2c2ab80a
z80a: add a few ops
2020-05-22 22:23:24 -04:00
Virgil Dupras
581c6d015c
Fix blk overflow in usage guide index
2020-05-22 20:39:28 -04:00
Virgil Dupras
6bff03a48b
Move adev to core
...
It's small enough to be worth it.
2020-05-22 14:50:34 -04:00
Virgil Dupras
bb190f9665
Add word TUCK
2020-05-22 14:19:02 -04:00
Virgil Dupras
41d439376d
Add word NIP
2020-05-22 14:19:02 -04:00
Virgil Dupras
f75b1c8864
Add word ?DUP
2020-05-22 14:19:02 -04:00
Virgil Dupras
ae87e88c52
Add 5x7 font
...
Also, fix PSP leak in font compilers.
2020-05-22 08:06:55 -04:00
Virgil Dupras
0939241db1
Add bootstrap guide
2020-05-21 15:25:12 -04:00
Virgil Dupras
e9e3bd80f6
ps2: fix PS2_SHIFT check
2020-05-21 08:53:36 -04:00
Virgil Dupras
7d28637740
ps2: add shift support
2020-05-20 20:31:56 -04:00
Virgil Dupras
b874a1c175
ps2: wip
2020-05-20 18:56:18 -04:00
Virgil Dupras
c86d8a74a0
sms/kbd: PS/2 driver WIP
2020-05-19 21:18:44 -04:00
Virgil Dupras
aad6b5c2e5
avra: add global constants
2020-05-19 10:48:48 -04:00
Virgil Dupras
ac309bbd9e
avra: rename AGAIN, to AGAIN?,
...
AGAIN, becomes a shortcut for "' RJMP AGAIN?,"
2020-05-19 10:36:07 -04:00
Virgil Dupras
7a41c5c6f9
avra: add IF, .. THEN,
...
I decided to keep SKIP, .. TO, (renamed from AT,) around and limit
IF, .. THEN, to the simple BRNE case.
2020-05-19 10:26:57 -04:00
Virgil Dupras
8bbd29d37d
avra: add SKIP, .. AT,
...
Will change to IF, .. THEN, but I need a way to easily reverse a
BR op. But from this commit, the translation of sms/kbd/ps2ctl.asm
is complete! perfect binary match!
2020-05-19 10:19:37 -04:00
Virgil Dupras
8ca85abfbd
avra: add BEGIN, .. AGAIN,
2020-05-19 07:39:34 -04:00
Virgil Dupras
7b7e60ed4a
avra: implement LD/ST
...
Still making great progress on sms/kbd/ps2ctl. Still matching ref
binary.
2020-05-18 22:28:58 -04:00
Virgil Dupras
e0bc14e55c
avra: implement BR*
...
Getting good! still advancing on ps2ctl in sms/kbd and still
matching reference binary.
2020-05-18 20:34:06 -04:00
Virgil Dupras
cdddfdefae
avra: add a layer of indirection to FLBL!
...
This will make it easier to fit BR* in there.
2020-05-18 19:45:30 -04:00
Virgil Dupras
63dec372ce
sms/kbd: continue advancing on ps2ctl rewrite
...
Still binary matching. Next step is branching support.
2020-05-17 21:10:02 -04:00
Virgil Dupras
177e70580f
sms/kbd: begin rewriting ps2ctl to Forth
...
So far, the resulting binary matches.
2020-05-17 14:24:27 -04:00
Virgil Dupras
8c4c879a65
avra: begin implementing forward label system
2020-05-17 11:04:08 -04:00
Virgil Dupras
212126d6d2
avra: add RJMP and RCALL
2020-05-17 10:13:43 -04:00
Virgil Dupras
b5d42924ba
avra: add arg range checks
2020-05-17 09:30:36 -04:00
Virgil Dupras
5227777b34
avra: add OPb and OPRdb instr classes
2020-05-17 08:57:23 -04:00
Virgil Dupras
2e23b84fc1
avra: simplify OPRdRr
2020-05-16 22:16:41 -04:00
Virgil Dupras
75a1b2d504
avra: add OPAb instr class
2020-05-16 21:59:07 -04:00
Virgil Dupras
322be4d576
avra: add OPNA instr class
2020-05-16 21:44:47 -04:00
Virgil Dupras
0f2d14ad8a
z80a: add BREAK, instruction
...
This allows us to remove a lot of labels usage in boot code. This
commit has no effect on forth.bin.
2020-05-16 21:02:50 -04:00
Virgil Dupras
fd597d29d2
boot: remove spurious label usage
2020-05-16 19:47:34 -04:00
Virgil Dupras
ee3407bf1c
avra: first steps
2020-05-16 09:51:02 -04:00
Virgil Dupras
863540f7c6
core: define H@ a bit sooner
2020-05-15 22:59:38 -04:00
Virgil Dupras
bd38d80f9c
Move Cross-compiled core from B390 to B350
...
and renamed it "Core words". Also, reworded the presentation.
2020-05-15 22:44:49 -04:00
Virgil Dupras
f2817870aa
sms: working on real hardware!
2020-05-15 21:53:26 -04:00
Virgil Dupras
7ceff6144c
sms: implement pad button B ( next class )
2020-05-15 21:18:32 -04:00
Virgil Dupras
b6c039589f
Don't emit BS when at beginning of input buffer
2020-05-15 20:51:09 -04:00
Virgil Dupras
aad713c477
sms: implement backspace with pad button A
2020-05-15 20:32:04 -04:00
Virgil Dupras
fdea069544
sms: implement button C and Start in Pad
2020-05-15 17:46:18 -04:00
Virgil Dupras
852c775b5b
sms: implement linefeed in VDP
2020-05-15 16:08:27 -04:00
Virgil Dupras
f9a8e6f180
sms: Pad WIP
2020-05-15 15:41:06 -04:00
Virgil Dupras
1597f1e131
Don't generalize XYPOS just yet
...
It was ill-advised.
2020-05-15 14:09:31 -04:00
Virgil Dupras
db9885b8cf
Rename (find) to FIND
...
I hadn't noticed that this word was almost ANS compliant.
2020-05-15 12:50:14 -04:00
Virgil Dupras
175b4bc497
sms: CollapseOS prompt!
2020-05-15 12:46:25 -04:00
Virgil Dupras
ca60685067
Streamline initialization process
...
Instead of letting each configuration taking care of RDLN$ and
"CollapseOS" prompt, move this to BOOT to simplify xcomp units.
Initialization source code is now only for driver initialization.
2020-05-15 11:34:35 -04:00
Virgil Dupras
0163af470a
Fix EOT behavior after QUIT
...
Previously, calling quit would break EOT behavior and not properly
quit Collapse OS.
2020-05-15 10:19:39 -04:00
Virgil Dupras
43eabf566b
sms: WIP !
2020-05-14 22:15:31 -04:00
Virgil Dupras
87b51a6261
By default, allocate about 0x100 bytes for PSP+RSP
...
During "make updatebootstrap", we use less than 0x20 bytes on the
PSP side and less than 0x40 bytes on the RSP one. 0x100 bytes ought
to be enough for anybody.
2020-05-14 18:41:09 -04:00
Virgil Dupras
bf289b0a67
z80a: de-variable-ize
...
Use straight VARIABLE instead of Z80MEM+. Initially, I used this
system to allow z80a to be embedded in a system binary, but now
I don't think it's worth it. Compiled, z80a is 2.5k. Sure, it's a
sizeable amount of RAM, but I think that even with it in RAM, I'll
manage a bootstrap within my most constrained machine, the SMS with
8K.
2020-05-14 15:29:22 -04:00
Virgil Dupras
3fbae082f4
Remove INTJUMP mechanism
...
Not worth the trouble. Easier to set jump in binary directly.
2020-05-14 15:13:16 -04:00
Virgil Dupras
a5269a1c7c
Make blk use system RAM
2020-05-14 14:51:20 -04:00
Virgil Dupras
eec9549bde
Make rdln use system RAM
2020-05-14 14:26:56 -04:00
Virgil Dupras
b606dbf9af
rc2014: move xcomp unit's contents to blkfs
2020-05-14 12:29:34 -04:00
Virgil Dupras
a8e8204eba
trs80: adapt recipe to single stage xcomp
2020-05-14 12:08:17 -04:00
Virgil Dupras
8a58449776
Add word ERR
2020-05-14 11:57:26 -04:00
Virgil Dupras
e6bac985fa
Cross-compiles in a single stage!
...
Finally got rid of the XPACKed core and managed to cross-compile
all core words, which greatly simplifies the bootstrapping process.
2020-05-14 10:17:38 -04:00
Virgil Dupras
68262f925b
Almost done De-XPACKing!
2020-05-14 09:58:48 -04:00
Virgil Dupras
640e3321fc
Move a bunch of words from XPACKed core to xcomp core
2020-05-14 09:54:33 -04:00
Virgil Dupras
4143e2a699
Improve late-stage xcomp
2020-05-14 09:45:42 -04:00
Virgil Dupras
179c66be8a
Move a bunch of words from XPACKed core to xcomp core
2020-05-14 08:50:43 -04:00
Virgil Dupras
74896051bb
Move BOOT, (boot<) and INTEPRET to high xcomp
...
Saves us an (ok) indirection and will save us more soon.
2020-05-14 08:45:01 -04:00
Virgil Dupras
b17bd4dca0
wip
2020-05-14 08:33:06 -04:00
Virgil Dupras
40a756cf1c
Move a bunch of words from XPACKed core to xcomp core
2020-05-14 08:18:53 -04:00
Virgil Dupras
51997533ff
Move a bunch of words from XPACKed core to xcomp core
2020-05-14 07:58:55 -04:00
Virgil Dupras
80d730318a
Simplify LOAD's INTERPRET exit mechanism
2020-05-13 22:55:52 -04:00
Virgil Dupras
2e9e7047bf
Make INTERPRET break on ASCII EOT
...
This should allow me to simplify LOAD's exit mechanism on block
end.
2020-05-13 21:44:46 -04:00
Virgil Dupras
052d59a3a2
TOWORD: tiny optimization
...
My mind is getting forthy.
2020-05-13 20:59:00 -04:00
Virgil Dupras
33d37d4ce9
WORD: don't overwrite RAM on words over 31 chars
...
This allows me to reclaim some RAM I hadn't even noticed I
needlessly monopolise.
2020-05-13 20:39:53 -04:00
Virgil Dupras
bd1e76ec5b
Gather all RC2014 drivers into a single "RC2014 Recipe section"
2020-05-13 14:56:38 -04:00
Virgil Dupras
9b85961093
Rename "Core words" to "XPACKed core"
...
Now that this section is so small, I think I can see a possibility
for cross-compiling Collapse OS entirely, which would be great
because we could get rid of the relinker.
2020-05-13 14:31:56 -04:00
Virgil Dupras
76037ca1e7
Simplify boot process
...
That INIT thing is unnecessary.
2020-05-13 14:19:54 -04:00
Virgil Dupras
bb77cd0759
xcomp: add overrides into a loadable block
...
Makes xcomp.fs units shorter.
2020-05-13 13:33:24 -04:00
Virgil Dupras
0434d02818
xcomp: implement X[']
2020-05-13 13:24:58 -04:00
Virgil Dupras
7c20501f27
Move core's blk to xcomp core (low and high)
...
TODO: implement X['] so that I can remove those XCURRENT patterns.
2020-05-13 10:50:46 -04:00
Virgil Dupras
d956386e9b
Move core's readln to xcomp core (high)
2020-05-13 09:28:32 -04:00
Virgil Dupras
029df00ad4
Free some space for xcomp core
2020-05-13 09:11:57 -04:00
Virgil Dupras
56af516d07
Move core's fmt to xcomp core (high)
2020-05-13 09:02:44 -04:00
Virgil Dupras
e2e9faef2c
Move a bunch of words from core to xcomp core
2020-05-13 08:50:07 -04:00
Virgil Dupras
d6a3e79394
Free some space for xcomp core low
2020-05-13 08:00:49 -04:00
Virgil Dupras
ddf23e3d02
Move a bunch of words from core to xcomp core
2020-05-13 07:55:36 -04:00
Virgil Dupras
6a5ff3adcb
rc2014: unify SD Card driver
...
Now more low/high layers.
2020-05-12 21:48:29 -04:00
Virgil Dupras
cbf5baf3b6
Pack core words a bit
...
This leaves space for xcomp-core which is growing.
2020-05-12 21:27:06 -04:00
Virgil Dupras
dfe474ca0e
xcomp: add XCOMPILE and X[COMPILE]
...
This allows us to move words like ABORT" to xcomp-core, which is
I think the last roadblock before being able to unify all drivers
into a single xcomp layer.
2020-05-12 21:08:18 -04:00
Virgil Dupras
44b065ff99
ti84: unify drivers
...
No more low/high
2020-05-12 12:41:47 -04:00
Virgil Dupras
1094ec9c57
Make DO..LOOP stable
...
DO and LOOP now only compile words from stable ABI, which make them
suitable for xcomp. This will greatly simplify driver writing and
allow us to mostly avoid the low/high divide in drivers.
LEAVE is still xcomp-incompatible though.
This make us very very tight for "<0x100" limit for literal words.
Hopefully, we won't need more stuff in that area of the binary...
2020-05-12 10:40:59 -04:00
Virgil Dupras
b760c2d353
SCPY: don't copy the NULL
...
This makes [entry] much simpler. Also, remove unused LITS word.
2020-05-12 07:36:20 -04:00
Virgil Dupras
231d727598
Move a few words from core to xcomp core
2020-05-12 07:21:34 -04:00
Virgil Dupras
9ad7ee7a4b
Rename Inner core to Cross-compiled core
...
And refreshed description.
2020-05-11 22:23:26 -04:00
Virgil Dupras
6beb082e29
acia: make wholly cross compilable
2020-05-11 21:52:44 -04:00
Virgil Dupras
da371451cc
Replace INITIAL_SP with PS_ADDR conf
...
Now I struggle to remember why I ever did things they way I did.
There must have been a reason...
2020-05-11 21:08:24 -04:00
Virgil Dupras
73482e7ea1
Reword root block
...
Usage of "LIST" wasn't explicit enough for a complete newcomer. I
hope that with this wording, anyone can figure out how to navigate
blocks and learn the system.
2020-05-11 20:12:21 -04:00
Virgil Dupras
73b6d9905e
Add 7x7 font
2020-05-10 21:37:23 -04:00
Virgil Dupras
62ae1012df
ti84: allow case select during a-lock with 2nd mode
2020-05-10 11:39:10 -04:00
Virgil Dupras
a6aba40327
ti84: fix a-lock debouncing bug
...
Yup, it was a deja vu. I remember now.
2020-05-10 11:26:58 -04:00
Virgil Dupras
06a4674317
ti84: implement a-lock
...
There's a bug where the first char after a-lock isn't a-modded. I
have troubles figuring it out for now. It feels like deja vu. I
think I had the same problem with asm.
2020-05-10 09:37:36 -04:00
Virgil Dupras
a476773813
Add words BIT@ and BIT!
2020-05-10 08:40:49 -04:00
Virgil Dupras
244776a7eb
ti84: enable alpha key
2020-05-09 20:54:47 -04:00
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