Abstract machines

 

Other example of abstract machine  :  Files

 

OPEN (F, Fp, Mode) :

    Open the logical file F and associate it to the physical file specifying whether the file is new ('N') or old ('A').
 

CLOSE(F) :

    Close file F.
 

READSEQ (F, V) :

    Read in buffer V the record (or block) that is in current position.
 

WRITESEQ (F, V) :

    Write the record (or block) V to the current position.
 

READDIR (F, V, n) :

    Read into V the n-th record (or block) of file F.
 

WRITEDIR (F, V, n) :

    Write record (or block ) V to n-th position.

 

Etc.