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

uses
  Crt, StringUtils, SySutils, CIO;

var
  strBuffer : string;
var
  eff_loop_var : byte;
  eff_cnt : byte;
  eff_string : string;
// Effectus example:
// Device I/O demo using PrintBD routine
// Sample file: H1:TESTNUM.TXT

procedure MAINProc;
var
  I : byte;  // I_byte_array
  key : byte;  // key_byte_array
begin
  Write(Chr(125));
  Write('PrintBD example', eol, '', eol, '');
  Cls(1);
  Opn(1, 8, 0, 'H1:TESTNUM.TXT');
  eff_string := '';
  Write('Write numbers to disk...');  // Print 1
  Writeln;
 FOR I:=1 TO 12 do begin
  strBuffer := IntToStr(I);
  BPut(1, @strBuffer[1], Length(strBuffer));
  end;
  Cls(1);
  eff_string := '';
  Write('Done!(file H1:TESTNUM.TXT)');  // Print 1
  Writeln;
  Write('', eol, '', eol, 'Press any key to continue!');
  key := Get(7);
  ReadKey;
end;

begin
  MAINProc;
end.
