From 906d4dfbf289723eefe16f53b7480ac449b5d2c4 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Sun, 12 Jul 2020 13:25:31 +0200 Subject: [PATCH] Split vf-blk-10-7d.fth into a (mostly) system independent part, a finailze part and pull the loading of the system dependent part up one level in the file include hierarchy. --- 6502/C64/src/vf-finalize.fth | 76 +++++++++++++++ 6502/C64/src/vf-main.fth | 7 +- .../{vf-blk-10-7d.fth => vf-sys-indep.fth} | 93 ------------------- 3 files changed, 82 insertions(+), 94 deletions(-) create mode 100644 6502/C64/src/vf-finalize.fth rename 6502/C64/src/{vf-blk-10-7d.fth => vf-sys-indep.fth} (97%) diff --git a/6502/C64/src/vf-finalize.fth b/6502/C64/src/vf-finalize.fth new file mode 100644 index 0000000..907bf11 --- /dev/null +++ b/6502/C64/src/vf-finalize.fth @@ -0,0 +1,76 @@ + +\ *** Block No. 123, Hexblock 7b +7b fthpage + +\ The remainder to do after loading the +\ system-dependent part of the sources. + +Host ' Transient 8 + @ + Transient Forth Context @ 6 + ! +Target + +Forth also definitions + +(C16 : (64 ) \ jumps belhind C) +(C64 : (16 ) + BEGIN name count 0= abort" C) missing" + @ [ Ascii C Ascii ) $100 * + ] Literal + = UNTIL ; immediate + +: C) ; immediate + +(C16 : (16 ) (C64 : (64 ) ; immediate + +: forth-83 ; \ last word in Dictionary + + + +\ *** Block No. 124, Hexblock 7c +7c fthpage + +( System dependent Constants bp/ks) + +Vocabulary Assembler +Assembler definitions +Transient Assembler + +PushA Constant PushA + \ put A sign-extended on stack +Push0A Constant Push0A + \ put A on stack +Push Constant Push + \ MSB in A and LSB on jsr-stack + +RP Constant RP +UP Constant UP +SP Constant SP +IP Constant IP +N Constant N +Puta Constant Puta +W Constant W +Setup Constant Setup +Next Constant Next +xyNext Constant xyNext +(2drop Constant Poptwo +(drop Constant Pop + +\ *** Block No. 125, Hexblock 7d +7d fthpage + +\ System patchup clv06aug87 + +Forth definitions + +(C64 C000 ' limit >body ! 7B00 s0 ! 7F00 r0 ! ) + +(C16 8000 ' limit >body ! 7700 s0 ! 7b00 r0 ! ) + +\ (C16+ fd00 ' limit >body ! +\ 7B00 s0 ! 7F00 r0 ! ) + +s0 @ dup s0 2- ! 6 + s0 7 - ! +here dp ! + +Host Tudp @ Target udp ! +Host Tvoc-link @ Target voc-link ! +Host move-threads diff --git a/6502/C64/src/vf-main.fth b/6502/C64/src/vf-main.fth index 791c53c..047dc08 100644 --- a/6502/C64/src/vf-main.fth +++ b/6502/C64/src/vf-main.fth @@ -8,7 +8,12 @@ Onlyforth Target definitions here! -include vf-blk-10-7d.fth +include vf-sys-indep.fth + +$7E $93 thru \ CBM-Interface +(c16+ $94 load ) \ c16init RamIRQ + +include vf-finalize.fth Assembler nonrelocate diff --git a/6502/C64/src/vf-blk-10-7d.fth b/6502/C64/src/vf-sys-indep.fth similarity index 97% rename from 6502/C64/src/vf-blk-10-7d.fth rename to 6502/C64/src/vf-sys-indep.fth index 0f7805b..3b8d611 100644 --- a/6502/C64/src/vf-blk-10-7d.fth +++ b/6502/C64/src/vf-sys-indep.fth @@ -2963,16 +2963,6 @@ Label forth-init Label donothing rts - - - - - - - - - - \ *** Block No. 122, Hexblock 7a 7a fthpage @@ -2997,86 +2987,3 @@ Label warmboot Label xyNext 0 # ldx 1 # ldy Next jmp end-code - - - - - -\ *** Block No. 123, Hexblock 7b -7b fthpage - -\ System-Loadscreen 01oct87clv/re) - - $7E $93 thru \ CBM-Interface -(c16+ $94 load ) \ c16init RamIRQ - - -Host ' Transient 8 + @ - Transient Forth Context @ 6 + ! -Target - -Forth also definitions - -(C16 : (64 ) \ jumps belhind C) -(C64 : (16 ) - BEGIN name count 0= abort" C) missing" - @ [ Ascii C Ascii ) $100 * + ] Literal - = UNTIL ; immediate - -: C) ; immediate - -(C16 : (16 ) (C64 : (64 ) ; immediate - -: forth-83 ; \ last word in Dictionary - - - -\ *** Block No. 124, Hexblock 7c -7c fthpage - -( System dependent Constants bp/ks) - -Vocabulary Assembler -Assembler definitions -Transient Assembler - -PushA Constant PushA - \ put A sign-extended on stack -Push0A Constant Push0A - \ put A on stack -Push Constant Push - \ MSB in A and LSB on jsr-stack - -RP Constant RP -UP Constant UP -SP Constant SP -IP Constant IP -N Constant N -Puta Constant Puta -W Constant W -Setup Constant Setup -Next Constant Next -xyNext Constant xyNext -(2drop Constant Poptwo -(drop Constant Pop - -\ *** Block No. 125, Hexblock 7d -7d fthpage - -\ System patchup clv06aug87 - -Forth definitions - -(C64 C000 ' limit >body ! 7B00 s0 ! 7F00 r0 ! ) - -(C16 8000 ' limit >body ! 7700 s0 ! 7b00 r0 ! ) - -\ (C16+ fd00 ' limit >body ! -\ 7B00 s0 ! 7F00 r0 ! ) - -s0 @ dup s0 2- ! 6 + s0 7 - ! -here dp ! - -Host Tudp @ Target udp ! -Host Tvoc-link @ Target voc-link ! -Host move-threads