Category : Pascal Source Code
Archive   : BOOST4.ZIP
Filename : MBLOCK.PAS

 
Output of file : MBLOCK.PAS contained in archive : BOOST4.ZIP
Program Mblock;

{ Demonstrates moving a box around on the screen
using the arrow keys }

uses crt,BOSHARE;

var
x1,x2,x3,
y1,y2,y3 : integer;
c : char;
hit : boolean;

Const
UpAr = #72;
DnAr = #80;
RtAr = #77;
LfAr = #75;

BEGIN

{--- Clear the screen, define & draw the box }
ClrScr;
putstr(h,Center('Use arrow keys to move box - Esc quits',80,' '),1,1,14);
x1 := 1;
y1 := 1;
x2 := 4;
y2 := 4;
x3 := x1;
y3 := y1;
box ( x1,y1,x2,y2,1,14 );

{--- Move box according to arrow keys; quit if Escape }
repeat
hit := true;
c := readkey;
if c = #0 then begin
c := readkey;
case c of
UpAr : if y1 > 1 then
y3 := y3 -1;
DnAr : if y2 < 25 then
y3 := y3 +1;
RtAr : if x2 < 80 then
x3 := x3 +1;
LfAr : if x1 > 1 then
x3 := x3 -1;
else
hit := false;
end;
if hit then begin
MoveBlkr ( x1,y1,x2,y2,x3,y3,14);
x1 := x3;
x2 := x1 + 3;
y1 := y3;
y2 := y1 + 3;
end;
end;
until c = #27;

END.

  3 Responses to “Category : Pascal Source Code
Archive   : BOOST4.ZIP
Filename : MBLOCK.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/