// Effectus auto-generated Mad Pascal source code listing
program printdePrg;

uses
  Crt, StringUtils, SySutils, CIO;

var
  strBuffer : string;
var
  eff_loop_var : byte;
  eff_cnt : byte;
  eff_string : string;
// Effectus example:
// Device Input/Output demonstration

procedure MAINProc;
var
  TEXT_BUF : array[0..10] of byte;  // TEXT_BUF_byte_array
  KEY : byte;  // KEY_byte_array
  num : word;  // num_byte_array
begin
  Cls(1);
  Opn(1, 8, 0, 'S:');
  eff_string := '';
  Write('PRINTING STRING VALUES TO CHANNEL 1');  // Print 1
  Writeln;
  eff_string := '';
  Write('ON S: DEVICE');  // Print 1
  Writeln;
  Writeln('');
  strBuffer := Concat('TEST1', #$9b);
  BPut(1, @strBuffer[1], Length(strBuffer));
  for eff_loop_var := 0 to 10 do    TEXT_BUF[eff_loop_var] := 32;
  eff_string := 'TEST2';
  for eff_loop_var := 0 to 4 do TEXT_BUF[eff_loop_var] := Ord(eff_string[eff_loop_var + 1]);
  strBuffer := Concat(eff_string, #$9b);
  BPut(1, @strBuffer[1], Length(strBuffer));
  strBuffer :=  'TEST3';
  BPut(1, @strBuffer[1], Length(strBuffer));
  strBuffer := IntToStr(10);
  BPut(1, @strBuffer[1], Length(strBuffer));
  Writeln('');
  strBuffer := Concat(IntToStr(20), #$9b);
  BPut(1, @strBuffer[1], Length(strBuffer));
  strBuffer := IntToStr(2000);
  BPut(1, @strBuffer[1], Length(strBuffer));
  Writeln('');
  strBuffer := Concat(IntToStr(10000), #$9b);
  BPut(1, @strBuffer[1], Length(strBuffer));
  strBuffer := IntToStr(6230);
  BPut(1, @strBuffer[1], Length(strBuffer));
  Writeln('');
  num := 65334;
  strBuffer := Concat(IntToStr(num), #$9b);
  BPut(1, @strBuffer[1], Length(strBuffer));
  Writeln('');
  Cls(1);
  KEY := Get(7);
  ReadKey;
end;

begin
  MAINProc;
end.
