mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 14:18:06 +11:00
Cross-compiles in a single stage!
Finally got rid of the XPACKed core and managed to cross-compile all core words, which greatly simplifies the bootstrapping process.
This commit is contained in:
parent
68262f925b
commit
e6bac985fa
19
blk/439
19
blk/439
@ -1,10 +1,9 @@
|
|||||||
( ';' can't have its name right away because, when created, it
|
: BEGIN H@ ; IMMEDIATE
|
||||||
is not an IMMEDIATE yet and will not be treated properly by
|
: AGAIN COMPILE (br) H@ - , ; IMMEDIATE
|
||||||
xcomp. )
|
: UNTIL COMPILE (?br) H@ - , ; IMMEDIATE
|
||||||
: _
|
: [ INTERPRET ; IMMEDIATE
|
||||||
['] EXIT ,
|
: ] R> DROP ;
|
||||||
R> DROP ( exit : )
|
: LIT< WORD 34 , SCPY 0 C, ; IMMEDIATE
|
||||||
; IMMEDIATE
|
: LITA 36 , , ;
|
||||||
';' XCURRENT @ 4 - C!
|
: COMPILE ' LITA ['] , , ; IMMEDIATE
|
||||||
':' X' _ 4 - C! ( give : its name )
|
: [COMPILE] ' , ; IMMEDIATE
|
||||||
'(' X' _ 4 - C!
|
|
||||||
|
19
blk/440
19
blk/440
@ -1,10 +1,11 @@
|
|||||||
: [ INTERPRET ; IMMEDIATE
|
( ';' can't have its name right away because, when created, it
|
||||||
: ] R> DROP ;
|
is not an IMMEDIATE yet and will not be treated properly by
|
||||||
: LIT< WORD 34 , SCPY 0 C, ; IMMEDIATE
|
xcomp. )
|
||||||
: LITA 36 , , ;
|
: _
|
||||||
|
['] EXIT ,
|
||||||
|
R> DROP ( exit : )
|
||||||
|
; IMMEDIATE
|
||||||
: ['] ' LITA ; IMMEDIATE
|
: ['] ' LITA ; IMMEDIATE
|
||||||
: COMPILE ' LITA ['] , , ; IMMEDIATE
|
';' X' _ 4 - C! ( give ; its name )
|
||||||
: [COMPILE] ' , ; IMMEDIATE
|
':' X' _ 4 - C! ( give : its name )
|
||||||
: BEGIN H@ ; IMMEDIATE
|
'(' X' _ 4 - C!
|
||||||
: AGAIN COMPILE (br) H@ - , ; IMMEDIATE
|
|
||||||
: UNTIL COMPILE (?br) H@ - , ; IMMEDIATE
|
|
||||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
@ -14,7 +14,6 @@
|
|||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
," CURRENT @ HERE ! "
|
," CURRENT @ HERE ! "
|
||||||
440 444 XPACKR
|
|
||||||
," ' (key) 12 RAM+ ! "
|
," ' (key) 12 RAM+ ! "
|
||||||
ORG @ 256 /MOD 2 PC! 2 PC!
|
ORG @ 256 /MOD 2 PC! 2 PC!
|
||||||
H@ 256 /MOD 2 PC! 2 PC!
|
H@ 256 /MOD 2 PC! 2 PC!
|
||||||
|
@ -18,8 +18,6 @@ RAMSTART 0x70 + CONSTANT ACIA_MEM
|
|||||||
(entry) _
|
(entry) _
|
||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
440 444 XPACKR ( core )
|
|
||||||
123 132 XPACKR ( linker )
|
|
||||||
," : _ ACIA$ RDLN$ (ok) ; _ "
|
," : _ ACIA$ RDLN$ (ok) ; _ "
|
||||||
ORG @ 256 /MOD 2 PC! 2 PC!
|
ORG @ 256 /MOD 2 PC! 2 PC!
|
||||||
H@ 256 /MOD 2 PC! 2 PC!
|
H@ 256 /MOD 2 PC! 2 PC!
|
||||||
|
@ -68,7 +68,6 @@ CREATE ~FNT CPFNT3x5
|
|||||||
(entry) _
|
(entry) _
|
||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
440 444 XPACKR ( core )
|
|
||||||
," : _ LCD$ KBD$ (ok) RDLN$ ; _ "
|
," : _ LCD$ KBD$ (ok) RDLN$ ; _ "
|
||||||
ORG @ 0x100 - 256 /MOD 2 PC! 2 PC!
|
ORG @ 0x100 - 256 /MOD 2 PC! 2 PC!
|
||||||
H@ 256 /MOD 2 PC! 2 PC!
|
H@ 256 /MOD 2 PC! 2 PC!
|
||||||
|
@ -14,7 +14,6 @@ RS_ADDR 0x80 - CONSTANT RAMSTART
|
|||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
," CURRENT @ HERE ! "
|
," CURRENT @ HERE ! "
|
||||||
440 444 XPACKR ( core )
|
|
||||||
499 500 XPACKR ( trs80.fs )
|
499 500 XPACKR ( trs80.fs )
|
||||||
( 0x0a == NLPTR. TRS-80 wants CR-only newlines )
|
( 0x0a == NLPTR. TRS-80 wants CR-only newlines )
|
||||||
," : _ ['] CR 0x0a RAM+ ! BLK$ FD$ (ok) RDLN$ ; _ "
|
," : _ ['] CR 0x0a RAM+ ! BLK$ FD$ (ok) RDLN$ ; _ "
|
||||||
|
Loading…
Reference in New Issue
Block a user