BIGDEMO.P is a demo program from the Kyan Pascal 2.x Utilities Disk 2.
It shows examples of how to read the joysticks, paddles, and function keys.
SOURCE CODE
program stickdemo(input,output);
TYPE
PATHSTRING=ARRAY[1..20] OF CHAR;
var
r,i:integer;
B :BOOLEAN;
STR:PATHSTRING;
#i stick.i
#I PADDLE.I
#I FUNCTKEY.I
#i helpkey.i
begin
WRITELN('THE STICKS');
for i:=0 to 3 do begin
R:=stick(i);
writeln('stick ',i,'- ',r);
B:=strig(i);
writeln('strig ',i,'- ',B);
end;
WRITELN('THE PADDLES');
FOR I:=0 TO 7 DO BEGIN
R:=PADDLE(I);
WRITELN('PAD ',I,'- ',R);
B:=PTRIG(I);
WRITELN('PTRIG ',I,'- ',B);
END;
I:=100;
FUNCTION_KEY(str,i);
WRITELN(STR,I);
help_key(str);
writeln(str);
end.
No comments:
Post a Comment