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

Compare commits

..

No commits in common. "b046aba7f9d5452b1873f91b069e7d48b5f5beb5" and "fc67b887209291967df477413499d386d922473c" have entirely different histories.

7 changed files with 34 additions and 28 deletions

View File

@ -1,5 +1,4 @@
: 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+ ;

24
emul/run.fs Normal file
View File

@ -0,0 +1,24 @@
: 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 BIN+ ! ( update LATEST ) H@ 0x08 ! ( update LATEST )

2
emul/stop.fs Normal file
View File

@ -0,0 +1,2 @@
(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 stage 1 ## Building the binary
You can start the process by building the stage 1 binary. Running `make` in You can start the process by building the binary. Running `make` in this folder
this folder will yield a `stage1.bin` file. You'll need it later. will yield a `os.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 < stage1.bin > stage1.ttysafe ./ttysafe < os.bin > os.ttysafe
On OpenBSD, the invocation can look like: On OpenBSD, the invocation can look like:
@ -198,30 +198,12 @@ 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<return>`. You'll If everything went well, you can run Collapse OS with `g3000<space>`. 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,7 +17,6 @@ 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 )
," : INIT CURRENT @ HERE ! RDLN$ (ok) INTERPRET ; INIT " ," : _ RDLN$ (ok) ; _ "
H@ 256 /MOD 2 PC! 2 PC! H@ 256 /MOD 2 PC! 2 PC!