summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/einfuehrung2/CHKDRV.PAS
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/einfuehrung2/CHKDRV.PAS')
-rw-r--r--Master/texmf-dist/doc/latex/einfuehrung2/CHKDRV.PAS30
1 files changed, 30 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/einfuehrung2/CHKDRV.PAS b/Master/texmf-dist/doc/latex/einfuehrung2/CHKDRV.PAS
new file mode 100644
index 00000000000..a8bf84b0f06
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/einfuehrung2/CHKDRV.PAS
@@ -0,0 +1,30 @@
+USES Dos,Crt;
+VAR Lw: Char;
+
+FUNCTION Checkdrive(Drive : Byte): Boolean;
+ VAR Regs: Registers;
+ Anz_Floppy,A_Or_B: Byte;
+
+ BEGIN
+ Anz_Floppy:=((Mem[$40:$10] And 192) Shr 6)+1;
+ A_Or_B:=Mem[$50:$04];
+ If ((Drive=1) And (Anz_Floppy=1) And (A_Or_B=00))
+ Or ((Drive=0) And (Anz_Floppy=1) And (A_Or_B=01)) Then
+ BEGIN
+ Checkdrive:=False;
+ Exit;
+ END;
+ Checkdrive:=Not(Disksize(Drive+1)=-1);
+ END;
+
+BEGIN
+ REPEAT
+ BEGIN
+ Lw:=Readkey;
+ Lw:=Upcase(Lw);
+ If Not Checkdrive(Ord(Lw)-65) Then
+ Writeln('Laufwerk ',Lw,' nicht vorhanden')
+ Else Writeln('Laufwerk ',Lw,' vorhanden');
+ END;
+ UNTIL Lw=#13;
+END.