--- gforth/Attic/kernel.fs 1996/09/30 13:16:11 1.4 +++ gforth/Attic/kernel.fs 1996/10/03 16:05:35 1.7 @@ -276,9 +276,23 @@ Defer source ( -- addr count ) \ core : (compile) ( -- ) \ gforth r> dup cell+ >r @ compile, ; -\ not the most efficient implementation of POSTPONE, but simple -: POSTPONE ( -- ) \ core - COMP' swap POSTPONE aliteral compile, ; immediate restrict +: postpone, ( w xt -- ) + \g Compiles the compilation semantics represented by @var{w xt}. + dup ['] execute = + if + drop compile, + else + dup ['] compile, = + if + drop POSTPONE (compile) compile, + else + swap POSTPONE aliteral compile, + then + then ; + +: POSTPONE ( "name" -- ) \ core + \g Compiles the compilation semantics of @var{name}. + COMP' postpone, ; immediate restrict : interpret/compile: ( interp-xt comp-xt "name" -- ) \ gforth Create immediate swap A, A, @@ -1715,7 +1729,7 @@ Variable argc \ addr1 u1 is a path string, addr2 u2 is an array of dir strings align here >r BEGIN - over >r [char] : scan + over >r 0 scan over r> tuck - ( rest-str this-str ) dup IF @@ -1797,7 +1811,7 @@ Defer 'cold ' noop IS 'cold ." Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." cr ; : boot ( path **argv argc -- ) - argc ! argv ! cstring>sstring save-mem pathstring 2! main-task up! + argc ! argv ! pathstring 2! main-task up! sp@ dup s0 ! $10 + dup >tib ! tibstack ! #tib off >in off rp@ r0 ! fp@ f0 ! ['] cold catch DoError bye ;