Diff for /gforth/cross.fs between versions 1.96 and 1.101

version 1.96, 2001/03/18 22:20:26 version 1.101, 2001/09/04 09:15:28
Line 808  ghost (next) Line 808  ghost (next)
 ghost unloop    ghost ;S                        2drop  ghost unloop    ghost ;S                        2drop
 ghost lit       ghost (compile) ghost !         2drop drop  ghost lit       ghost (compile) ghost !         2drop drop
 ghost (does>)   ghost noop                      2drop  ghost (does>)   ghost noop                      2drop
 ghost (.")      ghost (S")      ghost (ABORT")  2drop drop ( " )  ghost (.")      ghost (S")      ghost (ABORT")  2drop drop
 ghost '                                         drop  ghost '                                         drop
 ghost :docol    ghost :doesjump ghost :dodoes   2drop drop  ghost :docol    ghost :doesjump ghost :dodoes   2drop drop
 ghost :dovar    ghost :dodefer  ghost :dofield  2drop drop  ghost :dovar    ghost :dodefer  ghost :dofield  2drop drop
Line 944  Variable user-vars 0 user-vars ! Line 944  Variable user-vars 0 user-vars !
 : target>bitmask-size ( u1 -- u2 )  : target>bitmask-size ( u1 -- u2 )
   1- tcell>bit rshift 1+ ;    1- tcell>bit rshift 1+ ;
   
 : allocatetarget ( size --- adr )  : allocatetarget ( size -- adr )
   dup allocate ABORT" CROSS: No memory for target"    dup allocate ABORT" CROSS: No memory for target"
   swap over swap erase ;    swap over swap erase ;
   
Line 1050  T has? rom H Line 1050  T has? rom H
 ' dictionary ALIAS rom-dictionary  ' dictionary ALIAS rom-dictionary
   
   
 : setup-target ( -- )   \G initialize targets memory space  : setup-target ( -- )   \G initialize target's memory space
   s" rom" T $has? H    s" rom" T $has? H
   IF  \ check for ram and rom...    IF  \ check for ram and rom...
       \ address-space area nip 0<>        \ address-space area nip 0<>
Line 1087  T has? rom H Line 1087  T has? rom H
         ELSE    r> drop THEN          ELSE    r> drop THEN
    REPEAT drop ;     REPEAT drop ;
   
 \ MakeKernal                                                    22feb99jaw  \ MakeKernel                                                    22feb99jaw
   
 : makekernel ( targetsize -- targetsize )  : makekernel ( targetsize -- targetsize )
   dup dictionary >rlen ! setup-target ;    dup dictionary >rlen ! setup-target ;
Line 1579  Variable to-doc  to-doc on Line 1579  Variable to-doc  to-doc on
     IF      IF
         s" " doc-file-id write-line throw          s" " doc-file-id write-line throw
         s" make-doc " doc-file-id write-file throw          s" make-doc " doc-file-id write-file throw
           Last-Header-Ghost @ >ghostname doc-file-id write-file throw
         tlast @ >image count 1F and doc-file-id write-file throw  
         >in @          >in @
         [char] ( parse 2drop          [char] ( parse 2drop
         [char] ) parse doc-file-id write-file throw          [char] ) parse doc-file-id write-file throw
Line 2113  T has? peephole H [IF] Line 2112  T has? peephole H [IF]
 [ELSE]  [ELSE]
 : compile:  ( ghost -- ghost xt colon-sys )  :noname ;  : compile:  ( ghost -- ghost xt colon-sys )  :noname ;
 : ;compile ( ghost xt colon-sys -- ghost )  : ;compile ( ghost xt colon-sys -- ghost )
     postpone ; drop ; immediate      postpone ; drop ['] prim-resolved over >comp ! ; immediate
 [THEN]  [THEN]
   
 : by      ( -- ghost ) \ Name  : by      ( -- ghost ) \ Name
Line 2405  Cond: NEXT restrict? sys? next, ;Cond Line 2404  Cond: NEXT restrict? sys? next, ;Cond
   
 : ,"            [char] " parse T string, align H ;  : ,"            [char] " parse T string, align H ;
   
 Cond: ."        restrict? compile (.")     T ," H ;Cond ( " )  Cond: ."        restrict? compile (.")     T ," H ;Cond
 Cond: S"        restrict? compile (S")     T ," H ;Cond ( " )  Cond: S"        restrict? compile (S")     T ," H ;Cond
 Cond: ABORT"    restrict? compile (ABORT") T ," H ;Cond ( " )  Cond: ABORT"    restrict? compile (ABORT") T ," H ;Cond
   
 Cond: IS        T ' >body H compile ALiteral compile ! ;Cond  Cond: IS        T ' >body H compile ALiteral compile ! ;Cond
 : IS            T >address ' >body ! H ;  : IS            T >address ' >body ! H ;
Line 2443  Cond: compile ( -- ) restrict? \ name Line 2442  Cond: compile ( -- ) restrict? \ name
                IF   gexecute                 IF   gexecute
                ELSE compile (compile) addr, THEN THEN ;Cond                 ELSE compile (compile) addr, THEN THEN ;Cond
   
   Cond: [compile] ( -- ) restrict? \ name
         bl word gfind dup 0= ABORT" CROSS: Can't compile"
         0> IF    gexecute
            ELSE  dup >magic @ <imm> =
                  IF   gexecute
                  ELSE compile (compile) addr, THEN THEN ;Cond
   
 Cond: postpone ( -- ) restrict? \ name  Cond: postpone ( -- ) restrict? \ name
       bl word gfind dup 0= ABORT" CROSS: Can't compile"        bl word gfind dup 0= ABORT" CROSS: Can't compile"
       0> IF    gexecute        0> IF    gexecute
Line 2699  previous Line 2705  previous
 : .s            .s ;  : .s            .s ;
 : bye           bye ;  : bye           bye ;
   
   \ dummy
   
   : group  source >in ! drop ;
   
 \ turnkey direction  \ turnkey direction
 : H forth ; immediate  : H forth ; immediate
 : T minimal ; immediate  : T minimal ; immediate
Line 2716  previous Line 2726  previous
 : unlock previous forth also cross ;  : unlock previous forth also cross ;
   
 \ also minimal  \ also minimal
 : [[ also unlock ;  : [[+++ also unlock ;
 : ]] previous previous also also ;  : +++]] previous previous also also ;
   
 unlock definitions also minimal  unlock definitions also minimal
 : lock   lock ;  : lock   lock ;

Removed from v.1.96  
changed lines
  Added in v.1.101


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>