Fixed problem with TICK, but now only works when compiled.
[forth.jl.git] / src / lib.4th
index d806cb8..5d6507d 100644 (file)
         ( begin the definition with : NAME [IMMEDIATE] )
         ':' EMIT SPACE DUP ID. SPACE
         DUP ?IMMEDIATE IF ." IMMEDIATE " THEN
-        CR 8 SPACES
 
         >DFA            ( get the data address, ie. points after DOCOL | end-of-word start-of-data )
 
         BEGIN           ( end start )
                 2DUP >
         WHILE
-                DUP @ CFA> ID. SPACE
-                1+
-(                DUP @           ( end start codeword )
+                DUP @           ( end start codeword )
 
                 CASE
                 ' LIT OF                ( is it LIT ? )
                         2DUP TELL               ( print the string )
                         '"' EMIT SPACE          ( finish the string with a final quote )
                         +                       ( end start+1+len, aligned )
-                        1-                     ( because we're about to add 1 below )
+                        1-                     ( because we're about to add 4 below )
                 ENDOF
                 ' 0BRANCH OF            ( is it 0BRANCH ? )
                         ." 0BRANCH ( "
                 ENDCASE
 
                 1+             ( end start+1 )
-)
         REPEAT
 
         ';' EMIT CR