1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-10 02:58:06 +11:00
Commit Graph

1573 Commits

Author SHA1 Message Date
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
4017fd04ac
Replace deprecated bzero with memset (#119) 2020-06-16 18:58:23 -05:00
link2xt
79da1db90e
tools: mark local C functions as static (#120) 2020-06-16 18:58:00 -05: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
Virgil Dupras
bf0e999f8e pcat: read LATEST and jump to it 2020-06-14 14:51:32 -04:00
Virgil Dupras
a72322df31 pcat: begin structuring around words 2020-06-14 14:15:44 -04:00
Virgil Dupras
85a0b87da3 z80: reorder compiledWord and doesWord, saving ourselves a jump 2020-06-14 10:12:56 -04:00
Virgil Dupras
38d5a9f303 z80: inline cellWord in stable ABI 2020-06-14 10:07:46 -04:00
Virgil Dupras
40f92b9bab z80: optimize chkPS
Inline it in next and make chkPS, call a newly reserved label for
it directly, removing a layer of indirection. This frees a spot in
the stable ABI.
2020-06-14 09:48:10 -04:00
Virgil Dupras
31095bc04d z80: remove call indirections in tight spots 2020-06-14 09:29:34 -04:00
Virgil Dupras
2b7abf802f pcat: begin porting forth
I'm not sure yet where I'm going, but I'm not going to build the
8086 port from the ground up like I did with the z80, that is,
making is sustain itself and eventually merge its forth code with
core words. That would be too much work which would then be thrown
out (all those words I'll initially have to implement in asm which
are already implemented in Forth).

What I *think* I can do is build a mirror version of z80 boot code
and cross-compile it from the z80. This means it has to follow z80
stable ABI.

Nope, I'm not sure where I'm going...
2020-06-13 21:37:54 -04:00
Virgil Dupras
1a467efae1 pcat: use a far jump to boot into the OS
Unless I misunderstood, this is supposed to set CS. This would make
all SREG have the same value. This allows us to remove BIN( offset
from os.bin.

I've tried booting to offset 0, but it didn't seem to work. Let's
settle for 0x8000. 512kb of system RAM is way more than we need
anyways.
2020-06-13 20:06:51 -04:00
Virgil Dupras
507c2c12e7 8086asm: clarify operands and fix stupidities 2020-06-13 17:58:42 -04:00
Virgil Dupras
5033f17be2 8086asm: tidy up a bit 2020-06-13 16:21:56 -04:00
Liorst4
374932fa4d
Clean libz80/libz80.o in make clean (#118) 2020-06-13 15:56:28 -04:00
Virgil Dupras
07e50313c7 pcat: separate MBR code and OS code
MBR code now strictly loads OS code into memory and jumps into it.

Now, I've got to consolidate my assembler code, modrm logic is
messed up.
2020-06-13 15:35:16 -04:00
Virgil Dupras
e17f2e6907 pcat: read sector from floppy 2020-06-13 13:29:04 -04:00
Virgil Dupras
b037c86598 recipes/pcat: now tested on real hardware! 2020-06-13 11:47:32 -04:00
Virgil Dupras
f9d04848bd emul: adjust README. AT-XY is implemented 2020-06-13 11:46:59 -04:00
Maykel Moya
7be6475ea2
Document how to launch a REPL in the host (#117) 2020-06-13 11:11:54 -04:00
Virgil Dupras
66b27b0790 8086asm: properly initialize DS and DF 2020-06-12 19:07:23 -04:00
Virgil Dupras
177750c928 recipes/pcat: first steps into 8086! 2020-06-12 14:03:31 -04:00
Virgil Dupras
4e18fafe46 8086asm: now enough tooling to assemble a PC/AT Hello World boot 2020-06-12 13:12:41 -04:00
Virgil Dupras
210b833c71 8086asm: begin adding MODRM-enabled ops 2020-06-12 12:07:48 -04:00
Virgil Dupras
749fdf1b18 8086asm: add 8-bit JMP, MOVrI, INT,
Verified against nasm with equivalent code.
2020-06-12 11:29:00 -04:00
Virgil Dupras
405444d630 8086asm: first steps 2020-06-12 10:49:27 -04:00
Virgil Dupras
1871c46614 VE: add backspace support in replace mode 2020-06-11 22:29:05 -04:00
Virgil Dupras
dc368597a6 VE: Add dirtiness indicator in status bar
Written from VE!
2020-06-11 21:52:08 -04:00
Virgil Dupras
838c88459b Make BLK@ FLUSH only if loading a different block
Otherwise, when editing a file with VE, we would constantly write
to disk, which is a bit inefficient.
2020-06-11 21:42:52 -04:00
Virgil Dupras
e317e9cc78 VE: use system input buffer for IBUF and FBUF typing
This gives us backspace handling. Also, remove all usages of C<
which allows us to remove the C<* override.
2020-06-11 20:45:46 -04:00