Browse Source

xcomp: move all offset spitting to the end of the unit

I'd like to move this code, along with all recipe contents, to blk/.
It's easier if "emul-related" code is gathered at the same place.
pull/102/head
Virgil Dupras 4 years ago
parent
commit
31119c2de3
4 changed files with 6 additions and 7 deletions
  1. +1
    -1
      emul/xcomp.fs
  2. +3
    -4
      recipes/rc2014/selfhost/README.md
  3. +1
    -1
      recipes/rc2014/xcomp.fs
  4. +1
    -1
      recipes/trs80/xcomp.fs

+ 1
- 1
emul/xcomp.fs View File

@@ -9,7 +9,6 @@

CURRENT @ XCURRENT !

H@ 256 /MOD 2 PC! 2 PC!
282 LOAD ( boot.z80 )
393 LOAD ( icore )
(entry) _
@@ -19,4 +18,5 @@ PC ORG @ 8 + !
," : (emit) 0 PC! ; : (key) 0 PC@ ; "
422 459 XPACKR
," ' (key) 12 RAM+ ! "
ORG @ 256 /MOD 2 PC! 2 PC!
H@ 256 /MOD 2 PC! 2 PC!

+ 3
- 4
recipes/rc2014/selfhost/README.md View File

@@ -17,7 +17,7 @@ it from the makefile. If you take the time to look at the base recipe
`xcomp.fs` in a text editor and take a look at it.

To assemble stage 1 from RC2014, all you need to do is to type those commands
in the same order, and replace the `H@ 256 /MOD 2 PC! 2 PC!` lines with `H@ .X`.
in the same order, and replace the `/MOD 2 PC! 2 PC!` words with `.X`.
Those commands will inform you of the begin/end offsets of the assembled binary.

I'm not going to explain in detail what each command do, but only give you an
@@ -33,9 +33,8 @@ we'll of course need for the task ahead.

Then come xcomp overrides, which are needed for xcomp to be effective.

At this point, we're about to begin spitting binary content, so we want to know
where we're at. That's why you'll need to type `H@ .X` and write down the
result. That's the starting offset.
At this point, we're about to begin spitting binary content, this will be our
starting offset. `ORG` will soon be set to your current `H@`.

Then, we assemble the boot binary, drivers' native words, then inner core,
close the binary with a hook word. We're finished with cross-compiling.


+ 1
- 1
recipes/rc2014/xcomp.fs View File

@@ -15,7 +15,6 @@ RAMSTART 0x70 + CONSTANT ACIA_MEM

CURRENT @ XCURRENT !

H@ 256 /MOD 2 PC! 2 PC!
282 LOAD ( boot.z80 )
352 LOAD ( acia.z80 )
372 LOAD ( sdc.z80 )
@@ -28,4 +27,5 @@ PC ORG @ 8 + !
438 452 XPACKR ( print fmt readln )
123 132 XPACKR ( linker )
," : _ ACIA$ RDLN$ (ok) ; _ "
ORG @ 256 /MOD 2 PC! 2 PC!
H@ 256 /MOD 2 PC! 2 PC!

+ 1
- 1
recipes/trs80/xcomp.fs View File

@@ -9,7 +9,6 @@ RS_ADDR 0x80 - CONSTANT RAMSTART

CURRENT @ XCURRENT !

H@ 256 /MOD 2 PC! 2 PC!
0x3000 BIN( !
282 LOAD ( boot.z80 )
492 LOAD ( trs80.z80 )
@@ -22,4 +21,5 @@ PC ORG @ 8 + !
499 500 XPACKR ( trs80.fs )
( 0x0a == NLPTR. TRS-80 wants CR-only newlines )
," : _ ['] CR 0x0a RAM+ ! BLK$ FD$ (ok) RDLN$ ; _ "
ORG @ 256 /MOD 2 PC! 2 PC!
H@ 256 /MOD 2 PC! 2 PC!

Loading…
Cancel
Save