--- gforth/cross.fs 1998/12/22 21:17:14 1.63 +++ gforth/cross.fs 1999/01/21 20:09:13 1.66 @@ -1164,6 +1164,11 @@ VARIABLE ;Resolve 1 cells allot .sourcepos ." needs doer: " >in @ bl word count type >in ! cr THEN ghost tuck swap resolve swap >magic ! ; + +Variable prim# +: first-primitive ( n -- ) prim# ! ; +: Primitive ( -- ) \ name + prim# @ T Alias H -1 prim# +! ; >CROSS \ Conditionals and Comments 11may93jaw @@ -1247,7 +1252,7 @@ Cond: ['] T ' H alit, ;Cond : (lit,) ( n -- ) compile lit T , H ; ' (lit,) IS lit, -: (alit,) ( n -- ) lit, T here cell - H relon ; ' (alit,) IS alit, +: (alit,) ( n -- ) compile lit T a, H ; ' (alit,) IS alit, : (fini,) compile ;s ; ' (fini,) IS fini, @@ -1799,7 +1804,7 @@ Cond: S" restrict? compile (S") Cond: ABORT" restrict? compile (ABORT") T ," H ;Cond Cond: IS T ' >body H compile ALiteral compile ! ;Cond -: IS T ' >body ! H ; +: IS T >address ' >body ! H ; Cond: TO T ' >body H compile ALiteral compile ! ;Cond : TO T ' >body ! H ; @@ -1961,6 +1966,10 @@ tcell 1 = 0 and or tcell 2 = 2 and or tcell 4 = 4 and or tcell 8 = 6 and or +tchar 1 = $00 and or +tchar 2 = $28 and or +tchar 4 = $50 and or +tchar 8 = $78 and or magic 7 + c! : save-cross ( "image-name" "binary-name" -- )