--- gforth/cross.fs 2002/09/14 08:20:18 1.128 +++ gforth/cross.fs 2002/12/28 17:18:26 1.132 @@ -1174,6 +1174,8 @@ false DefaultValue header false DefaultValue backtrace false DefaultValue new-input false DefaultValue peephole +false DefaultValue abranch +true DefaultValue control-rack [THEN] true DefaultValue interpreter @@ -1702,7 +1704,7 @@ Ghost (loop) Ghost (+loop) Ghost (next) drop Ghost (does>) Ghost (compile) 2drop Ghost (.") Ghost (S") Ghost (ABORT") 2drop drop -Ghost (C") drop +Ghost (C") Ghost c(abort") Ghost type 2drop drop Ghost ' drop \ user ghosts @@ -1731,7 +1733,9 @@ Ghost state drop : ht-string, ( addr count -- ) dup there swap last-string 2! - dup T c, H bounds ?DO I c@ T c, H LOOP ; + dup T c, H bounds ?DO I c@ T c, H LOOP ; +: ht-mem, ( addr count ) + bounds ?DO I c@ T c, H LOOP ; >TARGET @@ -2266,6 +2270,7 @@ Defer setup-prim-semantics Variable prim# : first-primitive ( n -- ) prim# ! ; +: group 0 word drop prim# @ 1- -$200 and prim# ! ; : Primitive ( -- ) \ name >in @ skip? IF drop EXIT THEN >in ! s" prims" T $has? H 0= @@ -2927,12 +2932,6 @@ compile: does-resolved ;compile : branchoffset ( src dest -- ) - tchar / ; \ ?? jaw -: >resolve ( sys -- ) - X here ( dup ." >" hex. ) over branchoffset swap X ! ; - -: r ahead, there 2r> ht-mem, X align + >r then, r> compile ALiteral compile Literal compile type ;Cond +Cond: S" '" parse tuck 2>r ahead, there 2r> ht-mem, X align + >r then, r> compile ALiteral compile Literal ;Cond +Cond: C" ahead, there [char] " parse ht-string, X align + >r then, r> compile ALiteral ;Cond +Cond: ABORT" if, ahead, there [char] " parse ht-string, X align + >r then, r> compile ALiteral compile c(abort") then, ;Cond +[THEN] Cond: IS T ' >body H compile ALiteral compile ! ;Cond : IS T >address ' >body ! H ; @@ -3165,7 +3230,7 @@ Cond: postpone ( -- ) \ name hex >CROSS -Create magic s" Gforth2x" here over allot swap move +Create magic s" Gforth3x" here over allot swap move bigendian 1+ \ strangely, in magic big=0, little=1 tcell 1 = 0 and or @@ -3654,7 +3719,6 @@ previous : bye bye ; \ dummy -: group 0 word drop ; \ turnkey direction : H forth ; immediate