home *** CD-ROM | disk | FTP | other *** search
- (*
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓·── ──·▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓│ │░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ Unit was conceived, designed and written ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ by Floor A.C. Naaijkens for ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ UltiHouse Software / The ECO Group. ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ (C) MCMXCII by EUROCON PANATIONAL CORPORATION. ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ All Rights Reserved for The ECO Group. ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓│ │░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓·── ──·░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- *)
- {$O+}
- unit eco_pasc;
- interface
- uses
- crt, eco_lib
-
- ;
-
- procedure __setpopascii(x, y, f1, b1: integer);
- function __popascii : char;
-
-
-
- implementation
-
-
- var
- chnow, topleft,
- xpos, ypos, cfore, cback : byte;
-
-
- procedure errorbeep;
- begin
- sound(2000); delay(75); sound(1000); delay(75); nosound;
- end;
-
-
- procedure __setpopascii(x, y, f1, b1: integer);
- begin
- if x<1 then x := 1; { make sure x, y in bounds }
- if y<1 then y := 1;
- if x<63 then xpos := x else xpos := 62;
- if y<8 then ypos := y else ypos := 7;
- cfore := f1; cback := b1;
- end;
-
-
-
- function __popascii : char;
- var
- cch : word; { used to read in cursor pad keys }
- asciiexit : boolean; { set to true when ready to exit }
- functkey : boolean; { set to true when a function key read in }
- r, c, lr, lc : integer; { row, column position of selector box }
- sav : _scnimageptr;
-
-
- procedure showascii;
- var ii, xi, yi : integer;
- begin
- for ii := 1 to 64 do begin
- xi := ((ii-1) mod 8)*2+xpos+2; { column on screen }
- yi := ((ii+7) div 8)*2+ypos; { row on screen }
- __write(xi, yi, cfore, cback, chr(topleft+ii-1));
- end;
- end;
-
-
- begin
- new(sav); __savscn(sav); asciiexit := false;
- __bandwin(true, xpos, ypos, xpos+18, ypos+18, cfore, cback, sh_default, bt_single);
- __betwscn(xpos, xpos+18, ypos, cfore, cback, 'ASCII Table');
- showascii; lc := chnow mod 8 + 1; lr := (chnow-topleft) div 8 + 1;
- repeat
- c := chnow mod 8 + 1; r := (chnow-topleft)div 8 + 1;
- __write(xpos-1+lc*2, lr*2+ypos-1, cfore, cback, ' ');
- __write(xpos+1+lc*2, lr*2+ypos, cfore, cback, ' ');
- __write(xpos-1+lc*2, lr*2+ypos, cfore, cback, ' ');
- __write(xpos-1+lc*2, lr*2+ypos+1, cfore, cback, ' ');
- __write(xpos-1+c*2, r*2+ypos-1, cfore, cback, '┌─┐');
- __write(xpos+1+c*2, r*2+ypos, cfore, cback, '│');
- __write(xpos-1+c*2, r*2+ypos, cfore, cback, '│');
- __write(xpos-1+c*2, r*2+ypos+1, cfore, cback, '└─┘');
- lc := c; lr := r; __flushkey; cch := __retkey;
- case cch of
- _enter: asciiexit := true;
- _esc: begin __popascii := #0; __resscn(sav); dispose(sav); exit end;
- _down, _paddown: begin
- if chnow+8<255 then chnow := chnow+8 else errorbeep;
- if chnow>topleft+63 then begin topleft := topleft+8; showascii end;
- end;
- _up, _padup: begin
- if chnow-8 >= 0 then chnow := chnow-8 else errorbeep;
- if chnow<topleft then begin topleft := topleft-8; showascii end;
- end;
- _right, _padright: begin
- if chnow<255 then chnow := succ(chnow) else errorbeep;
- if chnow>topleft+63 then begin topleft := topleft+8; showascii end;
- end;
- _left, _padleft: begin
- if chnow>0 then chnow := pred(chnow) else errorbeep;
- if chnow<topleft then begin topleft := topleft-8; showascii end;
- end;
- _pgup, _padpgup: begin
- if topleft = 0 then errorbeep;
- if topleft>=64 then begin
- topleft := topleft-64; chnow := chnow-64; showascii
- end else begin chnow := chnow-topleft; topleft := 0; showascii end;
- end;
- _pgdn, _padpgdn: begin
- if topleft = 192 then errorbeep;
- if topleft<=128 then begin
- topleft := topleft+64; chnow := chnow + 64; showascii
- end else begin
- chnow := chnow+192-topleft; topleft := 192; showascii
- end;
- end;
- _home, _padhome: begin topleft := 0; chnow := 0; showascii end;
- _end, _padend: begin topleft := 192; chnow := 255; showascii end;
- else errorbeep;
- end; { case cch }
- until asciiexit; __resscn(sav); dispose(sav); __popascii := chr(chnow);
- end;
-
-
-
-
- {initialization}
- begin
- topleft := 0; chnow := 0; xpos := 20; ypos := 5; cfore := 7; cback := 0;
- end. {unit}
-