From dfce80a5d63472600c63204844a5c549243efec2 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Tue, 11 Aug 2020 00:27:03 +0200 Subject: [PATCH] Adapt trace.fth, 6502asm.fth and trns6502asm.fth to being loaded with INCLUDE --- 6502/C64/src/6502asm.fth | 49 ++++-------------------------------- 6502/C64/src/tracer.fth | 48 +++++++---------------------------- 6502/C64/src/trns6502asm.fth | 2 +- 3 files changed, 15 insertions(+), 84 deletions(-) diff --git a/6502/C64/src/6502asm.fth b/6502/C64/src/6502asm.fth index 0368aba..ea65ed6 100644 --- a/6502/C64/src/6502asm.fth +++ b/6502/C64/src/6502asm.fth @@ -6,25 +6,6 @@ Onlyforth Assembler also definitions -1 7 +thru - -3 +load \ Makros: rom ram sys - -Onlyforth - - - - - - - - - - - - - - - \ *** Block No. 6, Hexblock 6 @@ -49,11 +30,6 @@ $8080 , $1C0C , $801C , $2C80 , 6 Mode: )Y $F Mode: ) - - - - - \ *** Block No. 7, Hexblock 7 \ upmode cpu 20oct87re @@ -109,7 +85,6 @@ $0480 $14 m/cpu jsr $8480 $40 m/cpu jmp $0484 $20 m/cpu bit - \ *** Block No. 9, Hexblock 9 \ Assembler conditionals 20oct87re @@ -136,8 +111,6 @@ $0484 $20 m/cpu bit : ]]? ( REPEAT) jmp ]? ; - - \ *** Block No. 10, Hexblock a \ Assembler conditionals 20oct87re @@ -155,17 +128,6 @@ $50 Constant VS $70 Constant VC : bcs CC ?] ; : bvs VC ?] ; - - - - - - - - - - - \ *** Block No. 11, Hexblock b \ 2inc/2dec winc/wdec 20oct87re @@ -188,12 +150,6 @@ $50 Constant VS $70 Constant VC recover jsr end-code ] 0 last ! 0 ; - - - - - - \ *** Block No. 12, Hexblock c \ ;code Code code> bp/re03feb85 @@ -220,3 +176,8 @@ immediate : Label [ Assembler ] here >label Assembler ; + +\ TODO(pzembrod): enable once rom-ram-sys.fth works with include +\ include rom-ram-sys.fth \ Makros: rom ram sys + +Onlyforth diff --git a/6502/C64/src/tracer.fth b/6502/C64/src/tracer.fth index e446c7e..4f7a003 100644 --- a/6502/C64/src/tracer.fth +++ b/6502/C64/src/tracer.fth @@ -4,26 +4,17 @@ Onlyforth -\needs Code -$2B +load \ Trans Assembler +\needs Code include trns6502asm.fth \needs Tools Vocabulary Tools Tools also definitions - 1 6 +thru \ Tracer - 7 8 +thru \ Tools for decompiling - -Onlyforth - -\\ - -This nice Forth Tracer has been -developed by B. Pennemann and co -for Atari ST. CL Vogt has ported it -back to the volksForth 6502 C-16 and -C-64 - - +\ This nice Forth Tracer has been +\ developed by B. Pennemann and co +\ for Atari ST. CL Vogt has ported it +\ back to the volksForth 6502 C-16 and +\ C-64 \ *** Block No. 48, Hexblock 30 @@ -45,15 +36,6 @@ Only Forth also Tools also definitions | Variable last' | Variable #spaces - - - - - - - - - \ *** Block No. 49, Hexblock 31 \ tracer:cpush oneline cas16aug06 @@ -78,10 +60,6 @@ Only Forth also Tools also definitions 3+ ip> ! ; - - - - \ *** Block No. 50, Hexblock 32 \ tracer:step tnext clv04aug87 @@ -106,10 +84,6 @@ Label tnext IP 2inc W lda (W sta W 1+ lda (W 1+ sta - - - - \ *** Block No. 51, Hexblock 33 \ tracer:..tnext clv12oct87 @@ -132,12 +106,6 @@ Label tnext IP 2inc ['] oneline Is 'quit quit ; - - - - - - \ *** Block No. 52, Hexblock 34 \ tracer:do-trace traceable cas16aug06 @@ -165,7 +133,6 @@ end-code quit ; - \ *** Block No. 53, Hexblock 35 \ tracer:User-Words cas16aug06 @@ -242,3 +209,6 @@ Onlyforth Tools also definitions ( used for : ) ( Name String Literal Dump Clit Branch ) ( - - - - - - ) + + +Onlyforth diff --git a/6502/C64/src/trns6502asm.fth b/6502/C64/src/trns6502asm.fth index 6ebce53..b40bda4 100644 --- a/6502/C64/src/trns6502asm.fth +++ b/6502/C64/src/trns6502asm.fth @@ -8,7 +8,7 @@ here $800 hallot heap dp ! - 1 +load +include 6502asm.fth dp !