[gforth] / gforth / kernel / comp.fs  

gforth: gforth/kernel/comp.fs

Diff for /gforth/kernel/comp.fs between version 1.7 and 1.8

version 1.7, Sat Jan 2 14:03:36 1999 UTC version 1.8, Wed Feb 3 00:10:24 1999 UTC
Line 126 
Line 126 
 \ \ literals                                                    17dec92py  \ \ literals                                                    17dec92py
   
 : Literal  ( compilation n -- ; run-time -- n ) \ core  : Literal  ( compilation n -- ; run-time -- n ) \ core
       \G Compile appropriate code such that, at run-time, n is placed
       \G on the stack. Interpretation semantics are undefined.
     postpone lit  , ; immediate restrict      postpone lit  , ; immediate restrict
   
 : ALiteral ( compilation addr -- ; run-time -- addr ) \ gforth  : ALiteral ( compilation addr -- ; run-time -- addr ) \ gforth
     postpone lit A, ; immediate restrict      postpone lit A, ; immediate restrict
   
 : char   ( 'char' -- n ) \ core  : char   ( '<spaces>ccc' -- c ) \ core
       \G Skip leading spaces. Parse the string ccc and return c, the
       \G display code representing the first character of ccc.
     bl word char+ c@ ;      bl word char+ c@ ;
   
 : [char] ( compilation 'char' -- ; run-time -- n )  : [char] ( compilation '<spaces>ccc' -- ; run-time -- c ) \ core bracket-char
       \G Compilation: skip leading spaces. Parse the string ccc. Run-time:
       \G return c, the display code representing the first character of ccc.
       \G Interpretation semantics for this word are undefined.
     char postpone Literal ; immediate restrict      char postpone Literal ; immediate restrict
   
 \ \ threading                                                   17mar93py  \ \ threading                                                   17mar93py
Line 145 
Line 152 
     0 A, 0 ,  code-address! ;      0 A, 0 ,  code-address! ;
   
 : compile, ( xt -- )    \ core-ext      compile-comma  : compile, ( xt -- )    \ core-ext      compile-comma
       \G  Blah, blah.
     A, ;      A, ;
   
 : !does    ( addr -- ) \ gforth store-does  : !does    ( addr -- ) \ gforth store-does
Line 245 
Line 253 
     then ;      then ;
   
 : [ ( -- ) \ core       left-bracket  : [ ( -- ) \ core       left-bracket
       \G Enter interpretation state. Immediate word.
     ['] interpreter  IS parser state off ; immediate      ['] interpreter  IS parser state off ; immediate
   
 : ] ( -- ) \ core       right-bracket  : ] ( -- ) \ core       right-bracket
       \G Enter compilation state.
     ['] compiler     IS parser state on  ;      ['] compiler     IS parser state on  ;
   
 \ \ Strings                                                     22feb93py  \ \ Strings                                                     22feb93py
Line 256 
Line 266 
   here over char+ allot  place align ;    here over char+ allot  place align ;
   
 : SLiteral ( Compilation c-addr1 u ; run-time -- c-addr2 u ) \ string  : SLiteral ( Compilation c-addr1 u ; run-time -- c-addr2 u ) \ string
       \G Compilation: compile the string specified by c-addr1, u into
       \G the current definition. Run-time: return c-addr2 u describing
       \G the address and length of the string.
     postpone (S") here over char+ allot  place align ;      postpone (S") here over char+ allot  place align ;
                                              immediate restrict                                               immediate restrict
   


Generate output suitable for use with a patch program
Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help