home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Vectronix 2
/
VECTRONIX2.iso
/
FILES_01
/
KBMONITO.LZH
/
KBDMON.1_0
/
KBDMON.PAS
next >
Wrap
Pascal/Delphi Source File
|
1992-08-30
|
2KB
|
63 lines
program kbdmom;
{ Kleiner Monitor für den Tastaturprozessor }
{$R-,S-,I+,F+}
uses km_comds,
km_inout;
{*** Prozedur über Pointer aufrufen ***}
procedure callptr(procptr :pointer);
assembler;
asm
move.l procptr,a0
jsr (a0)
end;
var i,clpos1,clpos2 :integer;
cmdfnd :boolean;
cmdln :string;
{*** Hauptprogrammm ***}
begin
inststatvec;
writeln;
writeln('Speichermonitor für den ST-Tastaturprozessor V1.0');
writeln('W. Schneider, Berlin 05/92');
writeln;
mhelp;
repeat
cmdln:='';
write('#'); inputln(cmdln); writeln;
if cmdln<>'' then
begin
cmdfnd:=false; cmdln:=cmdln+#0;
for i:=0 to 31 do if comnames[i]=upcase(cmdln[1]) then
begin
cmdfnd:=true;
clpos1:=2; clpos2:=2;
paramcnt:=0;
while cmdln[clpos2]<>#0 do
begin
while cmdln[clpos1]=' ' do inc(clpos1);
while not(cmdln[clpos2] in [',',#0]) do inc(clpos2);
if clpos2>clpos1 then
begin
inc(paramcnt);
strpars[paramcnt]:=copy(cmdln,clpos1,clpos2-clpos1);
hexpars[paramcnt]:=rdhex(strpars[paramcnt]);
end;
if cmdln[clpos2]<>#0 then
begin
inc(clpos2,1);
clpos1:=clpos2;
end;
end;
callptr(comaddrs[i])
end;
if not(cmdfnd) then writeln('Unbekanntes Kommando!');
end;
until false;
end.