Diff for /gforth/blocks.fs between versions 1.1 and 1.2

version 1.1, 1994/08/10 17:22:35 version 1.2, 1994/08/31 19:42:43
Line 6 Line 6
   
 \ I think I avoid the assumption 1 char = 1 here, but I have not tested this  \ I think I avoid the assumption 1 char = 1 here, but I have not tested this
   
 1024 constant chars/block \ mandated by the standard  \ 1024 constant chars/block \ mandated by the standard
   
 create block-buffer chars/block chars allot  create block-buffer chars/block chars allot
   
Line 67  variable buffer-dirty buffer-dirty off Line 67  variable buffer-dirty buffer-dirty off
     \ reading in the block is unnecessary, but simpler      \ reading in the block is unnecessary, but simpler
     block ;      block ;
   
 variable scr 0 scr ! \ !! this should be a user var  User scr 0 scr !
   
 : list ( u -- )  : list ( u -- )
     \ calling block again and again looks inefficient but is necessary      \ calling block again and again looks inefficient but is necessary
Line 79  variable scr 0 scr ! \ !! this should be Line 79  variable scr 0 scr ! \ !! this should be
         scr @ block i 64 * chars + 64 type cr          scr @ block i 64 * chars + 64 type cr
     loop ;      loop ;
   
   : (source)  ( -- addr len )
     blk @ ?dup
     IF    block chars/block
     ELSE  tib #tib @
     THEN ;
   
   ' (source) IS source
   
   : load ( i*x n -- j*x )
     push-file
     dup loadline ! blk ! >in off ( ['] ) interpret ( catch )
     pop-file ( throw ) ;
   
 \ not yet implemented (with block semantics):  : thru ( i*x n1 n2 -- j*x )
     1+ swap 0 ?DO  I load  LOOP ;
   
 \ evaluate  : +load ( i*x n -- j*x )  blk @ + load ;
 \ load  
 \ refill  : +thru ( i*x n1 n2 -- j*x )
 \ thru    1+ swap 0 ?DO  I +load  LOOP ;
 \ \  

Removed from v.1.1  
changed lines
  Added in v.1.2


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