Virgil Dupras
d7f002df98
pcat: use boot drive no passed to bootloader through DL
...
instead of hardcoded drive 0.
2020-06-21 22:53:11 -04:00
Virgil Dupras
dc7f36263a
pcat: BLK-enabled!
...
That INT 13H logic was a bit tricky to implement...
read-only for now.
2020-06-21 22:07:12 -04:00
Virgil Dupras
8d645405b3
pcat: add RSP checks in next
2020-06-21 15:14:38 -04:00
Virgil Dupras
f9eb7c661b
8086asm: fix CMPrr, and CMPxx, argument order
2020-06-21 14:55:14 -04:00
Virgil Dupras
cd514e6cd6
pcat: add PSP checks in all native words
...
Also, fix (roll) which wasn't properly implemented.
2020-06-21 14:07:02 -04:00
Virgil Dupras
c2c32bbed8
pcat: properly handle IMMED flag in _find
2020-06-21 13:09:51 -04:00
Virgil Dupras
1b5333d0b4
pcat: move all find code in _find word
...
It isn't used by low level boot code anymore, so it can go there.
2020-06-21 11:57:12 -04:00
Virgil Dupras
dbd283758c
Refer to BOOT and (uflw) by addr in stable ABI
...
Was previously referred to by name+find, which was wasteful.
2020-06-21 11:41:10 -04:00
Virgil Dupras
dcaa515929
pcat: implement does
2020-06-21 10:40:09 -04:00
link2xt
d83d12899b
MOVE: do not crash when u is 0 ( #126 )
...
This commit adds ?DUP IF guards to MOVE and MOVE- that make them exit
when u is 0. Without these guards a DO loop was executed 65535 times
instead of 0.
In particular, this fixes a crash when "105 LOAD I " is executed
immediately after boot. Block editor word "I" passes IBUF length (0)
to MOVE- and MOVE in this case, causing a crash.
2020-06-21 05:49:45 -05:00
Virgil Dupras
99c05fff3c
pcat: it works!
...
Forth intepreter now works! There's still DOES> and overflow checks
to implement, but otherwise, we have it!
2020-06-20 20:06:42 -04:00
Virgil Dupras
ae719508d9
pcat: make /MOD division 16-bit
...
Was required for the many "256 /MOD" in the code.
2020-06-20 19:14:51 -04:00
Virgil Dupras
60ecab314e
pcat: we have PROMPT!
...
Not working, but we do get that sweet "CollapseOS".
2020-06-20 16:58:48 -04:00
Virgil Dupras
397ee3e3e6
Simplify word '
2020-06-20 14:13:41 -04:00
Virgil Dupras
1536434666
pcat: implement cell execution and shaping things up
2020-06-20 13:50:01 -04:00
Virgil Dupras
acf8e03f53
8086asm: add overflow check to RPCs,
...
I've spent way too much time debugging bugs caused by this...
*sigh*, why can't I learn?
2020-06-20 13:36:21 -04:00
Virgil Dupras
019fd8a67d
pcat: fix ?DUP
2020-06-20 07:34:46 -04:00
Virgil Dupras
9d2afd200c
pcat: implement (s)
2020-06-19 20:09:51 -04:00
Virgil Dupras
723d3c4249
pcat: all native words implemented!
...
(well, not PC@ and PC!, but I'm not even sure what would be the role
of these in a PC/AT. they're only used in drivers on the z80 front,
so they will not be immediately needed. todo... )
Now comes the fitting part.
2020-06-19 08:10:51 -04:00
Virgil Dupras
8cc8df0446
pcat: add native _find
2020-06-19 07:56:54 -04:00
Virgil Dupras
5ebdf84e78
pcat: more native words
...
almost there!
2020-06-19 07:26:33 -04:00
Virgil Dupras
89bc7df120
pcat: more native words
2020-06-18 23:10:14 -04:00
Virgil Dupras
3b21ba635d
pcat: add PICK and (roll)
2020-06-18 21:21:46 -04:00
Virgil Dupras
6b07296d30
pcat: more native words
2020-06-18 19:06:53 -04:00
Virgil Dupras
bd508daad9
pcat: begin organizing native words properly
...
This port is taking shape!
2020-06-18 15:28:30 -04:00
Virgil Dupras
6bc1738bfd
pcat: implement (loop)
...
8086 asm is a lot terser than z80... Those indirect memory operations
are very handy.
2020-06-18 15:01:04 -04:00
Virgil Dupras
aca9bc9058
z80: small optimization in cell execution
2020-06-18 08:02:45 -04:00
Virgil Dupras
035532acf7
z80: remove remaining indirections in execute calls
...
We now have a stable ABI that is pretty cleared up...
2020-06-18 07:50:20 -04:00
Virgil Dupras
42818d25be
z80: remove layers of indirection of find calls
2020-06-18 07:40:20 -04:00
Virgil Dupras
76e698157c
z80: remove layer of indirection in most "next" calls
...
The only calls still using the stable ABI indirection are those
made before the next routine is created.
2020-06-18 07:24:47 -04:00
Virgil Dupras
eba83fa9a9
z80: use named labels for boot routines
...
The usage of numerotated labels for this was becoming severly
confusing.
2020-06-18 07:16:40 -04:00
Virgil Dupras
eed817b517
pcat: adapt to word type change
2020-06-18 06:50:32 -04:00
Virgil Dupras
3d2dc041fb
Make word routines into word types
...
Instead of having wordref point to core word routines, I made them
into word 4 word types. It liberates space into the stable ABI and
should make porting to other arches easier.
I'm also thinking of combining word type with the namelen field
for precious bytes saving, but not now...
2020-06-17 21:41:01 -04:00
Virgil Dupras
3383a00040
Fix recipes with binary offset (ti84, trs80)
...
I broke them when I removed call indirection layers without also
removing usage of BCALL.
2020-06-17 17:44:33 -04:00
Virgil Dupras
1d468d2168
Fix mis-documentation about literal words
2020-06-17 16:31:08 -04:00
Virgil Dupras
2be2f74a43
Make literal word routines into regular native words
2020-06-17 14:25:32 -04:00
Virgil Dupras
ea9833d4ff
Remove LITA
...
It was useful when we still had the relinker, but now it has no use.
I was waiting a bit to see if the distinction would be useful again,
but it seems like it won't.
2020-06-17 13:50:42 -04:00
Virgil Dupras
abb4dc8bd7
Reduce the scope of the stable ABI
...
Only 2>R in actually needed in the RSP family (for LOOP). Reducing
the scope of the stable ABI makes porting to other arches easier.
2020-06-17 07:54:43 -04:00
Virgil Dupras
bc8144b4be
pcat: implement (br) and (br?)
2020-06-16 22:10:32 -04:00
Virgil Dupras
49979404a5
pcat: implement number literals
2020-06-16 21:34:35 -04:00
Virgil Dupras
a92864a595
pcat: implement RSP mechanism in execution model
2020-06-16 20:41:53 -04:00
link2xt
472331b450
Check spelling ( #121 )
2020-06-16 18:57:31 -05:00
link2xt
6a09910dfc
BROWSE: ignore invalid digits ( #123 )
...
Documentation in block 100 says a number followed by a space or return
lists the contents of the block. However, typing any other character
does this too, because _pdacc returns -1 in this case.
This is annoying because typing "n" instead of "N" immediately after
jumping to some block was bringing you to block 0. Now "n" is ignored
instead.
This commit changes the condition for printing to explicitly check for
the value of 1, which means whitespace according to _pdacc documentation
in block 355.
2020-06-16 18:55:26 -05:00
link2xt
f1a225ef3d
Fix unreadable sentence in block 031. ( #122 )
...
This clearly has some words missing.
2020-06-16 18:28:06 -05:00
Virgil Dupras
16d6a0b377
pcat: begin implementing compiledWord/next
2020-06-16 19:05:36 -04:00
Virgil Dupras
feeedcc55c
z80: small optimization in execute
...
I had more ambitious goals, but I backed out of it: not worth it.
This small optimization is an easy picking though.
2020-06-16 16:37:21 -04:00
Virgil Dupras
dabbd6c253
8086asm: add support for modrm 8-bit displacement
2020-06-15 06:52:47 -04:00
Virgil Dupras
d8d2e05eb2
pcat: make find compare strings
...
find is the biggest chunk of logic of the boot code. The 8086 version
is significantly terser than the z80 one. REP/CMPS helps...
2020-06-15 06:23:19 -04:00
Virgil Dupras
8c452f5add
pcat: begin implementing find
...
Not comparing strings yet. Without asm tooling support, it's a big
chunk to swallow at once. It's progressing well!
2020-06-14 21:52:58 -04:00
Virgil Dupras
3be30e24bb
pcat: implement execute and nativeWord
2020-06-14 15:27:26 -04:00