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

uses
  Crt, StringUtils, SySutils, Graph, CIO;

var
  strBuffer : string;
var
  eff_loop_var : byte;
  eff_cnt : byte;
  eff_string : string;
// Effectus example:
// Finescroll by greblus
// Modification by Gury (keypress check)
var
  key : byte;  // key_byte_array
  j : integer = 0;  // j_byte_array
  k : integer = 0;  // k_byte_array
  hsc : byte absolute 54276;  // hsc_byte_array
  tmpl : byte;  // tmpl_byte_array
  tmph : byte;  // tmph_byte_array
  tmp : byte;  // tmp_byte_array
  ndl : array[0..32] of byte = (112, 112, 112, 66, 64, 156, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 86, 216, 159, 65, 32, 156);  // ndl_byte_array

procedure CHNDLProc;
begin
  tmp := ndl[28];
  if  tmp  <  2  then begin
  ndl[28] := 255;
  tmp := ndl[29]-1;
  ndl[29] := tmp;
  end
  else begin
  tmp := ndl[28]-2;
  ndl[28] := tmp;
  end;  // if
end;

procedure SCROLProc;
begin
  hsc := j;
  j := j+1;
  if  j=17  then begin
  CHNDLProc;
  j := 0;
  k := k+1;
  end;  // if
  if  k=14  then begin
  ndl[28] := tmpl;
  ndl[29] := tmph;
  k := 0;
  end;  // if
  asm
    .by $4C $62 $E4 
  end;  // asm end 1
end;

procedure MAINProc;
var
  i : integer;  // i_byte_array
  sav : word absolute 88;  // sav_byte_array
  clock : byte absolute $14;  // clock_byte_array
  nmi : byte absolute $D40E;  // nmi_byte_array
  dlist : word absolute 560;  // dlist_byte_array
  vvblkd : word absolute $0224;  // vvblkd_byte_array
  col0 : byte absolute 708;  // col0_byte_array
  col1 : byte absolute 709;  // col1_byte_array
begin
  InitGraph(0);
  dlist := word(@ndl);
  sav := 40000;
  col0 := 14;
  col1 := 14;
 for i:=1 to 23 do begin
  Write('line:', i, '', eol, '');
  end;
  eff_string := '';
  Write('Action!');  // Print 1

  tmpl := ndl[28];
  tmph := ndl[29];
  i := clock;
 while clock=i do begin
  end;
  nmi := 0;
  vvblkd := word(@SCROLProc);
  nmi := $40;
  key := Get(7);
  ReadKey;
end;

begin
  MAINProc;
end.
