| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- Listing:
- 1 (* Release 3.10 *)
- 2 (*-------------------------------------------------------------------------*
- 3 * *
- 4 * BIOSIO.MOD - BIOS level i/o *
- 5 * *
- 6 * COPYRIGHT (C) 1987..1992 Clarion Software Corporation. *
- 7 * All Rights Reserved *
- 8 * *
- 9 *--------------------------------------------------------------------------*)
- 10
- 11 (*%F _fdata *)
- 12 (*# call(seg_name => null) *)
- 13 (*%E *)
- 14 (*# module(implementation=>off) *)
- 15 (*# data(seg_name => null) *)
- 16 (*# check(stack=>off,
- 17 index=>off,
- 18 range=>off,
- 19 overflow=>off,
- 20 nil_ptr=>off) *)
- 21
- 22 IMPLEMENTATION MODULE BiosIO ;
- 23
- 24 IMPORT Lib,IO,SYSTEM;
- 25
- 26
- 27 PROCEDURE KeyPressed() : BOOLEAN ;
- 28 VAR R : SYSTEM.Registers;
- ***** ^ not supported yet
- 29 BEGIN
- 30 IF LastChar = CHR(0) THEN
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 31 RETURN TRUE ;
- 32 ELSE
- 33 R.AH := 1;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 34 IF EnhancedBIOS THEN R.AH := 11H END ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 35 Lib.Intr(R,16H);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 36 RETURN NOT (SYSTEM.ZeroFlag IN R.Flags) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 37 END ;
- 38 END KeyPressed;
- ***** ^ not supported yet
- 39
- 40 PROCEDURE RdKey () : CHAR ;
- 41 VAR R : SYSTEM.Registers;
- ***** ^ not supported yet
- 42 BEGIN
- 43 IF LastChar = CHR(0) THEN
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 44 LastChar := CHR(0FFH) ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 45 RETURN CHR(LastScan) ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 46 ELSE
- 47 IF EnhancedBIOS THEN
- ***** ^ undeclared identifier
- 48 R.AH := 10H ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 49 Lib.Intr(R,16H);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 50 IF (R.AL=0E0H)AND(R.AH<>0) THEN R.AL := 0 END ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 51 ELSE
- 52 R.AH := 0 ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 53 Lib.Intr(R,16H);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 54 END ;
- 55 IF R.AX=0 THEN END ; (* break *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 56 LastChar := CHR(R.AL) ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 57 LastScan := R.AH ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 58 RETURN LastChar ;
- ***** ^ undeclared identifier
- 59 END;
- 60 END RdKey ;
- ***** ^ not supported yet
- 61
- 62
- 63
- 64 PROCEDURE RdChar () : CHAR ;
- 65 (* reads and echoes char (if not extended) *)
- 66 VAR C : CHAR ;
- 67 BEGIN
- 68 IF LastChar = CHR(0) THEN RETURN RdKey() END ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 69 C := RdKey() ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 70 IF C<>CHR(0) THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 71 IO.WrChar( C );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 72 END ;
- 73 RETURN C ;
- 74 END RdChar ;
- ***** ^ not supported yet
- 75
- 76 PROCEDURE KBFlags () : KBFlagSet ;
- ***** ^ undeclared identifier
- 77 VAR R : SYSTEM.Registers;
- ***** ^ not supported yet
- 78 BEGIN
- 79 R.AH := 2 ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 80 Lib.Intr(R,16H);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 81 RETURN KBFlagSet(R.AL) ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 82 END KBFlags ;
- ***** ^ not supported yet
- 83
- 84 PROCEDURE Init ;
- 85 VAR R : SYSTEM.Registers ;
- ***** ^ not supported yet
- 86 i : CARDINAL ;
- 87 BEGIN
- 88 LastScan := 0 ;
- ***** ^ undeclared identifier
- 89 LastChar := CHR(0FFH) ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 90 EnhancedBIOS := FALSE ;
- ***** ^ undeclared identifier
- 91 (* Check for enhanced BIOS *)
- 92 R.AX := 5FFH ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 93 R.CX := 0FFFFH ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 94 Lib.Intr(R,16H); (* Put FFFF into Kbd buffer *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 95 IF R.AL=0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 96 i := 256 ;
- 97 LOOP
- 98 R.AH := 11H ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 99 Lib.Intr(R,16H); (* And try and read it back *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 100 IF SYSTEM.ZeroFlag IN R.Flags THEN EXIT END ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 101 R.AH := 10H ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 102 Lib.Intr(R,16H); (* And try and read it back *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 103 IF (R.AX=0FFFFH) OR (i=0) THEN EXIT END ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 104 DEC (i);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 105 END ;
- 106 IF R.AX=0FFFFH THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 107 EnhancedBIOS := TRUE ;
- ***** ^ undeclared identifier
- 108 END ;
- 109 END ;
- 110 END Init ;
- ***** ^ not supported yet
- 111
- 112 BEGIN
- 113 Init ;
- ***** ^ not supported yet
- 114 END BiosIO.
- ***** ^ not supported yet
- 115
- 124 errors
|