MODULE editor;

(* based on the kilo editor building course*)

(* Step 4 *)

IMPORT FIO, SYSTEM;

VAR 
    c : CHAR;
    p : POINTER TO CHAR;

BEGIN
    p := SYSTEM.ADR(c);
    (* PROCEDURE ReadNBytes (f: File; nBytes: CARDINAL; dest: ADDRESS) : CARDINAL ; *)
    WHILE (FIO.ReadNBytes(FIO.StdIn,1,p) = 1) AND (c <> "q") DO
        ;
    END;
END editor.