|
|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1792 (0x700)
Types: TextFile
Names: »JEKK1.PAS«
└─⟦d814f614c⟧ Bits:30008872 EDB Trænings- og Erhvervs Center / Almen Nyttig Data Service
└─⟦this⟧ »JEKK1.PAS«
program test;
const
lf = @10;
maxline = 132;
loc_att = @28;
bell = @7;
delscr = 12;
cr = @13;
nul = @0;
cmd = 'term';
var
i, q, valg : integer;
c : char;
tekst : string(.maxline.);
readtimeout : boolean;
maxtry : boolean;
f : file;
res : integer;
buf : string(.127.);
label
igen,
ud;
type
strform = string(.maxline.);
pchar = ^char;
function rdrstatus : boolean;
var res : byte;
begin
code
$2A,$01,$00, (* LD HL,(1) *)
$01,$4A,$00, (* LD BC,04AH *)
$09, (* ADD HL,BC *)
$CD,*+7, (* CALL L1 *)
$32,RES, (* LD (RES),A *)
$18,1, (* JR L2 *)
$E9; (* L1: JP (HL) *)
(* L2: *)
rdrstatus := (res = 255);
end;
function readchraux: char;
var c : char;
i : integer;
begin
i:=1;
repeat i:=i+1 until rdrstatus or (i=500);
if i = 500 then
begin
readtimeout:=true;
readchraux := (chr(255));
end else
begin
read(aux,c);
readchraux:=chr(ord(c) and 127);
end;
end;
BEGIN
writeln; writeln;
writeln('--> programstart <--');
writeln('tast return');
read(valg);
igen:
if rdrstatus then
begin
writeln('signal modtaget på porten !!! <--');
read(aux,c);
end else
begin
write('.');
end;
if keypress then
begin
writeln;
writeln('programmes stoppes ...');
goto ud;
end;
goto igen;
ud:
END.
«eof»