const code : array[0..7] of byte =
      ($3E,$01,$CD,$9B,$BE,$0E,$BC,$C9);
procedure read;

var loop : byte;

begin
 for loop:=0 to 7 do
  mem[$BE80+loop]:=code[loop];
end;

begin
 read;
 inline($CD/$80/$BE);
 writeln('This is Mode 1');
 repeat until keypressed;
 mem[$BE81]:=$02;
 inline($CD/$80/$BE);
 writeln('Back to Mode 2');
end.
