[gforth] / gforth / blocks.fs  

gforth: gforth/blocks.fs

Diff for /gforth/blocks.fs between version 1.16 and 1.17

version 1.16, Sun Jul 6 16:03:24 1997 UTC version 1.17, Thu Jul 31 16:17:06 1997 UTC
Line 32 
Line 32 
 require struct.fs  require struct.fs
   
 struct  struct
     1           cells: field buffer-block   \ the block number      cell%               field buffer-block   \ the block number
     1           cells: field buffer-fid     \ the block's fid      cell%               field buffer-fid     \ the block's fid
     1           cells: field buffer-dirty   \ the block dirty flag      cell%               field buffer-dirty   \ the block dirty flag
     chars/block chars: field block-buffer   \ the data      char% chars/block * field block-buffer   \ the data
     0           cells: field next-buffer      cell% 0 *           field next-buffer
 end-struct buffer-struct  end-struct buffer-struct
   
 Variable block-buffers  Variable block-buffers
Line 46 
Line 46 
   
 User block-fid  User block-fid
   
 : block-cold  : block-cold ( -- )
     block-fid off  last-block off      block-fid off  last-block off
     buffers buffer-struct drop * allocate throw dup block-buffers !      buffer-struct buffers * %alloc dup block-buffers ! ( addr )
     buffers buffer-struct drop * erase ;      buffer-struct %size buffers * erase ;
   
 ' block-cold INIT8 chained  ' block-cold INIT8 chained
   
Line 114 
Line 114 
 ' flush IS flush-blocks  ' flush IS flush-blocks
   
 : get-buffer ( n -- a-addr )  : get-buffer ( n -- a-addr )
     buffers mod buffer-struct drop * block-buffers @ + ;      buffers mod buffer-struct %size * block-buffers @ + ;
   
 : block ( u -- a-addr )  : block ( u -- a-addr )
     dup 0= -35 and throw      dup 0= -35 and throw


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

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help