Skip to content
Jorge Janaite Neto edited this page Sep 3, 2021 · 1 revision

BLOCKS

CREATE-FILE ( n --) FILENAME.EXT : creates a BLK file with n blocks

CAPACITY ( --) : return total number of screens

MORE ( n --): adds more blocks to current file

OPEN ( --) FILENAME.EXT : open file as input and output (closes previously opened file)

FROM ( --) FILENAME.EXT : open file as input

SWITCH ( --): exchange input and output files


BLOCK ( n -- addr ) : get block n into a buffer and returns it address (DO NOT STORE this address, it could be invalid after another BLOCK call)

FLUSH ( -- ): Save and clear all the buffers

UPDATE ( -- ): Mark the most recently used buffer as modified

DISCARD ( -- ): removes the updated mark from most recently used buffer

EMPTY-BUFFERS ( -- ): clear all the buffers

SAVE-BUFFERS ( -- )


OPEN dest.blk FROM source.blk 2 4 COPY : copy all data from source.blk SCR#2 to dest.blk SCR#4

OPEN dest.blk FROM source.blk 1 4 TO 6 CONVEY: copy SRC#1-SCR#4 to dest.blk SCR#6-SCR#9

Clone this wiki locally