Diff for /gforth/cross.fs between versions 1.113 and 1.115

version 1.113, 2001/09/12 14:45:38 version 1.115, 2001/09/16 10:21:13
Line 202  Create bases   10 ,   2 ,   A , 100 , Line 202  Create bases   10 ,   2 ,   A , 100 ,
   
 [THEN]  [THEN]
   
   \ this provides assert( and struct stuff
   \GFORTH [IFUNDEF] assert1(
   \GFORTH also forth definitions require assert.fs previous
   \GFORTH [THEN]
   
   >CROSS
   
 hex     \ the defualt base for the cross-compiler is hex !!  hex     \ the defualt base for the cross-compiler is hex !!
 \ Warnings off  \ Warnings off
   
Line 1007  Variable reuse-ghosts reuse-ghosts off Line 1014  Variable reuse-ghosts reuse-ghosts off
   
 \ ' >ghostname ALIAS @name  \ ' >ghostname ALIAS @name
   
   : findghost ( "ghostname" -- ghost ) 
     bl word gfind 0= ABORT" CROSS: Ghost don't exists" ;
   
 : [G'] ( -- ghost : name )  : [G'] ( -- ghost : name )
 \G ticks a ghost and returns its address  \G ticks a ghost and returns its address
 \  bl word gfind 0= ABORT" CROSS: Ghost don't exists"    findghost
   ghost state @ IF postpone literal THEN ; immediate    state @ IF postpone literal THEN ; immediate
   
 : g>xt ( ghost -- xt )  : g>xt ( ghost -- xt )
 \G Returns the xt (cfa) of a ghost. Issues a warning if undefined.  \G Returns the xt (cfa) of a ghost. Issues a warning if undefined.
Line 1043  End-Struct addr-struct Line 1053  End-Struct addr-struct
   
 \ Predefined ghosts                                    12dec92py  \ Predefined ghosts                                    12dec92py
   
   Ghost - drop \ need a ghost otherwise "-" would be treated as a number
   
 Ghost 0=                                        drop  Ghost 0=                                        drop
 Ghost branch    Ghost ?branch                   2drop  Ghost branch    Ghost ?branch                   2drop
 Ghost (do)      Ghost (?do)                     2drop  Ghost (do)      Ghost (?do)                     2drop
Line 1057  Ghost ' Line 1069  Ghost '
 Ghost :docol    Ghost :doesjump Ghost :dodoes   2drop drop  Ghost :docol    Ghost :doesjump Ghost :dodoes   2drop drop
 Ghost :dovar                                    drop  Ghost :dovar                                    drop
 Ghost over      Ghost =         Ghost drop      2drop drop  Ghost over      Ghost =         Ghost drop      2drop drop
 Ghost - drop  
 Ghost 2drop drop  Ghost 2drop drop
 Ghost 2dup drop  Ghost 2dup drop
   Ghost state drop
   Ghost call drop
   Ghost @ drop
   Ghost useraddr drop
   Ghost execute drop
   Ghost + drop
   Ghost (C") drop
   Ghost decimal drop
   Ghost hex drop
   
 \ \ Parameter for target systems                         06oct92py  \ \ Parameter for target systems                         06oct92py
   
Line 2176  Comment (       Comment \ Line 2194  Comment (       Comment \
 \ compile                                              10may93jaw  \ compile                                              10may93jaw
   
 : compile  ( "name" -- ) \ name  : compile  ( "name" -- ) \ name
 \  bl word gfind 0= ABORT" CROSS: Can't compile "    findghost
   ghost  
   dup >exec-compile @ ?dup    dup >exec-compile @ ?dup
   IF    nip compile,    IF    nip compile,
   ELSE  postpone literal postpone gexecute  THEN ;  immediate restrict    ELSE  postpone literal postpone gexecute  THEN ;  immediate restrict
Line 2199  Cond: [']  T ' H alit, ;Cond Line 2216  Cond: [']  T ' H alit, ;Cond
   
 : [T']  : [T']
 \ returns the target-cfa of a ghost, or compiles it as literal  \ returns the target-cfa of a ghost, or compiles it as literal
   postpone [G'] state @ IF postpone g>xt ELSE g>xt THEN ; immediate    postpone [G'] 
     state @ IF postpone g>xt ELSE g>xt THEN ; immediate
   
 \ \ threading modell                                    13dec92py  \ \ threading modell                                    13dec92py
 \ modularized                                           14jun97jaw  \ modularized                                           14jun97jaw
Line 2324  Cond: MAXI Line 2342  Cond: MAXI
  ;Cond   ;Cond
   
 >CROSS  >CROSS
   
 \ Target compiling loop                                12dec92py  \ Target compiling loop                                12dec92py
 \ ">tib trick thrown out                               10may93jaw  \ ">tib trick thrown out                               10may93jaw
 \ number? defined at the top                           11may93jaw  \ number? defined at the top                           11may93jaw
Line 2344  Cond: MAXI Line 2363  Cond: MAXI
   IF    0> IF swap lit,  THEN  lit, discard    IF    0> IF swap lit,  THEN  lit, discard
   ELSE  2drop restore-input throw Ghost gexecute THEN  ;    ELSE  2drop restore-input throw Ghost gexecute THEN  ;
   
 >TARGET  
 \ : ; DOES>                                            13dec92py  \ : ; DOES>                                            13dec92py
 \ ]                                                     9may93py/jaw  \ ]                                                     9may93py/jaw
   
   >CROSS
   
 : compiling-state ( -- )  : compiling-state ( -- )
 \G set states to compililng  \G set states to compililng
     Compiling comp-state !      Compiling comp-state !
Line 2362  Cond: MAXI Line 2382  Cond: MAXI
    IF >ghost-xt @ execute X off ELSE drop THEN     IF >ghost-xt @ execute X off ELSE drop THEN
    Interpreting comp-state ! ;     Interpreting comp-state ! ;
   
   >TARGET
   
 : ]   : ] 
     compiling-state      compiling-state
     BEGIN      BEGIN

Removed from v.1.113  
changed lines
  Added in v.1.115


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