1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-02 08:30:55 +11:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Virgil Dupras
b046aba7f9 recipes/trs80: running!
no floppy yet.
2020-04-29 12:26:44 -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
7 changed files with 28 additions and 34 deletions

View File

@ -1,4 +1,5 @@
: RAM+ [ RAMSTART LITN ] + ; : RAM+ [ RAMSTART LITN ] + ;
: BIN+ [ BIN( @ LITN ] + ;
: (parse*) 0x0a RAM+ ; : (parse*) 0x0a RAM+ ;
: HERE 0x04 RAM+ ; : HERE 0x04 RAM+ ;
: CURRENT* 0x51 RAM+ ; : CURRENT* 0x51 RAM+ ;

View File

@ -1,24 +0,0 @@
: EFS@
256 /MOD 3 PC! 3 PC!
1024 0 DO
4 PC@
BLK( I + C!
LOOP
;
: EFS!
256 /MOD 3 PC! 3 PC!
1024 0 DO
BLK( I + C@ 4 PC!
LOOP
;
: INIT
CURRENT @ HERE !
BLK$
['] EFS@ BLK@* !
['] EFS! BLK!* !
RDLN$
LIT< _sys [entry]
." Collapse OS" CRLF
INTERPRET
;

Binary file not shown.

View File

@ -25,4 +25,4 @@
(entry) _ (entry) _
H@ 256 /MOD 2 PC! 2 PC! H@ 256 /MOD 2 PC! 2 PC!
H@ 0x08 ! ( update LATEST ) H@ 0x08 BIN+ ! ( update LATEST )

View File

@ -1,2 +0,0 @@
(entry) _
H@ 256 /MOD 2 PC! 2 PC!

View File

@ -63,10 +63,10 @@ my knowledge. As far as I know, the COMM program doesn't allow this.
What are we going to do? We're going to punch in a binary program to handle that What are we going to do? We're going to punch in a binary program to handle that
kind of reception! You're gonna feel real badass about it too... kind of reception! You're gonna feel real badass about it too...
## Building the binary ## Building the stage 1
You can start the process by building the binary. Running `make` in this folder You can start the process by building the stage 1 binary. Running `make` in
will yield a `os.bin` file. You'll need it later. this folder will yield a `stage1.bin` file. You'll need it later.
## Testing serial communication ## Testing serial communication
@ -167,7 +167,7 @@ filename to send. Before you send the binary, make it go through
`tools/ttysafe` first (which just takes input from stdin and spits tty-safe `tools/ttysafe` first (which just takes input from stdin and spits tty-safe
content to stdout): content to stdout):
./ttysafe < os.bin > os.ttysafe ./ttysafe < stage1.bin > stage1.ttysafe
On OpenBSD, the invocation can look like: On OpenBSD, the invocation can look like:
@ -198,12 +198,30 @@ session on the other, type a few characters, and try `pingpong` again.
## Running Collapse OS ## Running Collapse OS
If everything went well, you can run Collapse OS with `g3000<space>`. You'll If everything went well, you can run Collapse OS with `g3000<return>`. You'll
get a usable Collapse OS prompt! get a usable Collapse OS prompt!
Like with the `recv` program, nothing stops you from dumping that binary to a Like with the `recv` program, nothing stops you from dumping that binary to a
floppy. floppy.
## Saving to disk
You could save your sent content as-is by following the instructions you had
for the `RECV` program, but that would mean that your executable would boostrap
itself every time it starts, which takes multiple seconds. You're better off
saving a compiled version of Collapse OS, something you already have once you
see the "ok" after running `g3000<return>`.
Before you do that, however, you need to update your `LATEST` field, something
you can do with `CURRENT @ 0x08 BIN+ !`. You also need to know where your
binary stops, something you'll get with `H@ .X`.
Then, you can go back to TRSDOS with the BREAK key followed by `o<return>` and
proceed with writing the proper memory area to disk.
TODO: make this work. this doesn't actually work. Saving it before compilation
works though.
## Configuration ## Configuration
In addition to the generic basic shell, this build of Collapse OS has support In addition to the generic basic shell, this build of Collapse OS has support

View File

@ -1,5 +1,5 @@
0x6000 CONSTANT RAMSTART
0xf000 CONSTANT RS_ADDR 0xf000 CONSTANT RS_ADDR
RS_ADDR 0x80 - CONSTANT RAMSTART
212 LOAD ( z80 assembler ) 212 LOAD ( z80 assembler )
262 LOAD ( xcomp ) 262 LOAD ( xcomp )
: CODE XCODE ; : CODE XCODE ;
@ -17,6 +17,7 @@ H@ 256 /MOD 2 PC! 2 PC!
(entry) _ (entry) _
( Update LATEST ) ( Update LATEST )
PC ORG @ 8 + ! PC ORG @ 8 + !
," CURRENT @ HERE ! "
422 463 XPACKR ( core cmp print parse readln fmt ) 422 463 XPACKR ( core cmp print parse readln fmt )
," : _ RDLN$ (ok) ; _ " ," : INIT CURRENT @ HERE ! RDLN$ (ok) INTERPRET ; INIT "
H@ 256 /MOD 2 PC! 2 PC! H@ 256 /MOD 2 PC! 2 PC!