Diff for /gforth/Attic/kernel.fs between versions 1.17 and 1.22

version 1.17, 1997/03/04 22:09:54 version 1.22, 1997/03/27 13:31:02
Line 68  NIL AConstant NIL \ gforth Line 68  NIL AConstant NIL \ gforth
   
 \ Aliases  \ Aliases
   
 ' i Alias r@  ' i Alias r@ ( -- w ; R: w -- w ) \ core r-fetch
   \ copy w from the return stack to the data stack
   
 \ Bit string manipulation                              06oct92py  \ Bit string manipulation                              06oct92py
   
Line 264  Defer source ( -- addr count ) \ core Line 265  Defer source ( -- addr count ) \ core
 : (compile) ( -- ) \ gforth  : (compile) ( -- ) \ gforth
     r> dup cell+ >r @ compile, ;      r> dup cell+ >r @ compile, ;
   
 : postpone, ( w xt -- )  : postpone, ( w xt -- ) \ gforth postpone-comma
     \g Compiles the compilation semantics represented by @var{w xt}.      \g Compiles the compilation semantics represented by @var{w xt}.
     dup ['] execute =      dup ['] execute =
     if      if
Line 961  end-struct interpret/compile-struct Line 962  end-struct interpret/compile-struct
         then          then
     then ;      then ;
   
 : find ( c-addr -- xt +-1 / c-addr 0 ) \ core  : find ( c-addr -- xt +-1 / c-addr 0 ) \ core,search
     dup count sfind dup      dup count sfind dup
     if      if
         rot drop          rot drop
Line 1037  G -1 warnings T ! Line 1038  G -1 warnings T !
 0C constant #ff ( -- c ) \ gforth  0C constant #ff ( -- c ) \ gforth
 0A constant #lf ( -- c ) \ gforth  0A constant #lf ( -- c ) \ gforth
   
 : bell  #bell emit ;  : bell ( -- ) \ gforth
       \g makes a beep and flushes the output buffer
       #bell emit
       outfile-id flush-file drop ;
 : cr ( -- ) \ core  : cr ( -- ) \ core
     \ emit a newline      \ emit a newline
     #lf ( sic! ) emit ;      #lf ( sic! ) emit ;
Line 1261  DEFER DOERROR Line 1265  DEFER DOERROR
 ;  ;
   
 : (DoError) ( throw-code -- )  : (DoError) ( throw-code -- )
     [ has-os [IF] ] outfile-id >r  stderr to outfile-id [ [THEN] ] 
   sourceline# IF    sourceline# IF
                source >in @ sourceline# 0 0 .error-frame                 source >in @ sourceline# 0 0 .error-frame
   THEN    THEN
Line 1282  DEFER DOERROR Line 1287  DEFER DOERROR
   ELSE    ELSE
      .error       .error
   THEN    THEN
   normal-dp dpp ! ;    normal-dp dpp !
     [ has-os [IF] ] r> to outfile-id [ [THEN] ] 
   ;
   
 ' (DoError) IS DoError  ' (DoError) IS DoError
   
Line 1301  DEFER DOERROR Line 1308  DEFER DOERROR
 \ : .name ( name -- ) name>string type space ;  \ : .name ( name -- ) name>string type space ;
 \ : words  listwords @  \ : words  listwords @
 \          BEGIN  @ dup  WHILE  dup .name  REPEAT drop ;  \          BEGIN  @ dup  WHILE  dup .name  REPEAT drop ;
 Defer 'cold ' noop IS 'cold  Defer 'cold ( -- ) \ gforth tick-cold
   \ hook (deferred word) for things to do right before interpreting the
   \ command-line arguments
   ' noop IS 'cold
   
 : cold ( -- ) \ gforth  : cold ( -- ) \ gforth
 [ has-files [IF] ]  [ has-files [IF] ]
Line 1310  Defer 'cold ' noop IS 'cold Line 1320  Defer 'cold ' noop IS 'cold
 [ [THEN] ]  [ [THEN] ]
     'cold      'cold
 [ has-files [IF] ]  [ has-files [IF] ]
     argc @ 1 >      ['] process-args catch ?dup
     IF      IF
         ['] process-args catch ?dup          dup >r DoError cr r> negate (bye)
         IF      THEN
             dup >r DoError cr r> negate (bye)      argc @ 1 >
         THEN      IF \ there may be some unfinished line, so let's finish it
         cr          cr
     THEN      THEN
 [ [THEN] ]  [ [THEN] ]

Removed from v.1.17  
changed lines
  Added in v.1.22


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