MakeVT52:
PROC
RETURNS [t: Term] = {
t ← NEW [TermRep ← [cp: NewControlProgram[] ]];
AddInstruction[t.cp, LIST["\007"], [Flash]];
AddInstruction[t.cp, LIST["\010"], [SkipCursor, $left]];
AddInstruction[t.cp, LIST["\011"], [Tab, $dontTouch]];
AddInstruction[t.cp, LIST["\012"], [SkipCursor, $down]];
AddInstruction[t.cp, LIST["\015"], [CarriageReturn]];
AddInstruction[t.cp, LIST["\033A"], [SkipCursor, $up]];
AddInstruction[t.cp, LIST["\033C"], [SkipCursor, $right]];
AddInstruction[t.cp, LIST["\033H\033J"], [ClearScreen]];
AddInstruction[t.cp, LIST["\033I"], [ScrollBack]];
AddInstruction[t.cp, LIST["\033J"], [ClrTo, $eos]];
AddInstruction[t.cp, LIST["\033K"], [ClrTo, $eol]];
AddInstruction[t.cp,
LIST["\033Y",
NEW [DecodeRep ← [reg: line, base: NumChars, org: ' , len: 1]],
NEW [DecodeRep ← [reg: col, base: NumChars, org: ' , len: 1]]],
[JumpCursor, $hv]];
};
}.