From bb77cd0759e0d17733a3eb2e9be479ff431cea71 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Wed, 13 May 2020 13:33:24 -0400 Subject: [PATCH] xcomp: add overrides into a loadable block Makes xcomp.fs units shorter. --- blk/260 | 2 +- blk/270 | 11 +++++++++++ emul/xcomp.fs | 10 +--------- recipes/rc2014/xcomp.fs | 11 +---------- recipes/ti84/xcomp.fs | 9 +-------- recipes/trs80/xcomp.fs | 10 +--------- 6 files changed, 16 insertions(+), 37 deletions(-) create mode 100644 blk/270 diff --git a/blk/260 b/blk/260 index f593c76..82592d1 100644 --- a/blk/260 +++ b/blk/260 @@ -2,7 +2,7 @@ Cross compilation program This programs allows cross compilation of boot binary and icore. Run "262 LOAD" right before your cross compilation and -then set XCURRENT to CURRENT. +then "270 LOAD" to apply xcomp overrides. This unit depends on a properly initialized z80a with ORG and BIN( set. That is how we determine compilation offsets. diff --git a/blk/270 b/blk/270 new file mode 100644 index 0000000..69ac51a --- /dev/null +++ b/blk/270 @@ -0,0 +1,11 @@ +: CODE XCODE ; +: ['] X['] ; IMMEDIATE +: COMPILE XCOMPILE ; IMMEDIATE +: [COMPILE] X[COMPILE] ; IMMEDIATE +: IMMEDIATE XIMM ; +: (entry) (xentry) ; +: CREATE XCREATE ; +: : [ ' X: , ] ; + +CURRENT @ XCURRENT ! + diff --git a/emul/xcomp.fs b/emul/xcomp.fs index 0879310..ddd05d3 100644 --- a/emul/xcomp.fs +++ b/emul/xcomp.fs @@ -3,15 +3,7 @@ 0xfffa CONSTANT PS_ADDR 212 LOAD ( z80 assembler ) 262 LOAD ( xcomp ) -: CODE XCODE ; -: ['] X['] ; IMMEDIATE -: COMPILE XCOMPILE ; IMMEDIATE -: [COMPILE] X[COMPILE] ; IMMEDIATE -: IMMEDIATE XIMM ; -: (entry) (xentry) ; -: : [ ' X: , ] ; - -CURRENT @ XCURRENT ! +270 LOAD ( xcomp overrides ) 282 LOAD ( boot.z80 ) 393 LOAD ( xcomp core low ) diff --git a/recipes/rc2014/xcomp.fs b/recipes/rc2014/xcomp.fs index 3f53c5f..0f5a5ae 100644 --- a/recipes/rc2014/xcomp.fs +++ b/recipes/rc2014/xcomp.fs @@ -9,16 +9,7 @@ RAMSTART 0x70 + CONSTANT ACIA_MEM 212 LOAD ( z80 assembler ) 262 LOAD ( xcomp ) -: CODE XCODE ; -: ['] X['] ; IMMEDIATE -: COMPILE XCOMPILE ; IMMEDIATE -: [COMPILE] X[COMPILE] ; IMMEDIATE -: IMMEDIATE XIMM ; -: (entry) (xentry) ; -: CREATE XCREATE ; -: : [ ' X: , ] ; - -CURRENT @ XCURRENT ! +270 LOAD ( xcomp overrides ) 282 LOAD ( boot.z80 ) 393 LOAD ( xcomp core low ) diff --git a/recipes/ti84/xcomp.fs b/recipes/ti84/xcomp.fs index 14d6a83..977ceaf 100644 --- a/recipes/ti84/xcomp.fs +++ b/recipes/ti84/xcomp.fs @@ -8,14 +8,7 @@ RAMSTART 0x72 + CONSTANT KBD_MEM : ZFILL, ( u ) 0 DO 0 A, LOOP ; 262 LOAD ( xcomp ) 522 LOAD ( font compiler ) -: CODE XCODE ; -: ['] X['] ; IMMEDIATE -: COMPILE XCOMPILE ; IMMEDIATE -: [COMPILE] X[COMPILE] ; IMMEDIATE -: IMMEDIATE XIMM ; -: (entry) (xentry) ; -: CREATE XCREATE ; ( for KBD tbls ) -: : [ ' X: , ] ; +270 LOAD ( xcomp overrides ) ( TI-84+ requires specific code at specific offsets which come in conflict with Collapse OS' stable ABI. We thus diff --git a/recipes/trs80/xcomp.fs b/recipes/trs80/xcomp.fs index 5722dd7..176c243 100644 --- a/recipes/trs80/xcomp.fs +++ b/recipes/trs80/xcomp.fs @@ -3,15 +3,7 @@ RS_ADDR 0x80 - CONSTANT RAMSTART 212 LOAD ( z80 assembler ) 262 LOAD ( xcomp ) -: CODE XCODE ; -: ['] X['] ; IMMEDIATE -: COMPILE XCOMPILE ; IMMEDIATE -: [COMPILE] X[COMPILE] ; IMMEDIATE -: IMMEDIATE XIMM ; -: (entry) (xentry) ; -: : [ ' X: , ] ; - -CURRENT @ XCURRENT ! +270 LOAD ( xcomp overrides ) 0x3000 BIN( ! 282 LOAD ( boot.z80 )