anchor.diff: -\ t: PUTS		." PUTS " . . . CR 0 ;
  -\ t: GETS		." GETS " . . . CR 0 ;
  -
   \ clocks points to an array of counters, each corresponding to
   \ a local block buffer.  Whenever a buffer is referenced, the
   \ corresponding clock field is updated with the current
  
positive.code: 
  \ clk! ( r -- ) updates the clock for the corresponding
  \ cache line.
  t: clk!		bclk @ DUP 1+ bclk ! SWAP CELLS clocks @ + ! ;
  
  \ assign ( b r -- a ) assigns a specified cache row to the
  \ provided block.  It answers with the corresponding block
  \ buffer for the cache row specified.
  t: assign ( b r -- a )
    >R R@ clk!
    R@ CELLS blocks @ + !
    0 R@ laundry @ + C!
    R> 1024 * buffers @ + ;
  
  \ ?wrb ( r -- ) cleans the specified cache row.  If it's
  \ dirty, it'll flush the cache contents to backing store.
  
negative.code: \ provided cache row index.
  t: >buf		1024 * buffers @ + ;
  
  \ >blk ( r -- a ) calculates the block cache address for the
  \ provided cache row index.
  t: >blk		CELLS blocks @ + ;
  
  \ >clk ( r -- a ) calculates the clock cache address for the
  \ provided cache row index.
  t: >clk		CELLS clocks @ + ;
  
  \ wrb ( r -- ) writes back the indicated block buffer.
  t: wrb ( r -- )	DUP >R R@ >buf R@ CELLS
  		blocks @ + @ 1 LSHIFT 2 PUTS THROW R> clean ;
  