home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / windows / infop141.zip / EXTERNS.PAS next >
Pascal/Delphi Source File  |  1990-12-08  |  2KB  |  105 lines

  1. unit externs;
  2. {$A-,B-,D-,E-,F-,L-,N-,O-,R-,S-,V-}
  3. interface
  4.  
  5. uses Crt, Dos;
  6.  
  7. type
  8.   cpu_info_t = record
  9.     cpu_type : byte;
  10.     MSW : word;
  11.     GDT : array[1..6] of byte;
  12.     IDT : array[1..6] of byte;
  13.     intflag : boolean;
  14.     ndp_type : byte;
  15.     ndp_cw : word;
  16.     weitek: byte;
  17.     test_type: char
  18.   end;
  19.  
  20. var
  21.   mono: boolean;
  22.  
  23. procedure CPUID(var a: cpu_info_t);
  24.  
  25. function diskread(drive: byte; starting_sector: longint;
  26.   number_of_sectors: word; var buffer): word;
  27.  
  28. procedure longcall(addr: longint; var regs: registers);
  29.  
  30. function ATIinfo(data_in: byte; register: word): byte;
  31.  
  32. procedure AltIntr(intno: byte; var regs: registers);
  33.  
  34. procedure AltMsDos(var regs: registers);
  35.  
  36. function CTICK: byte;
  37.  
  38. function TsengCK: byte;
  39.  
  40. function ZyMOSCK: byte;
  41.  
  42. function CirrusCK: byte;
  43.  
  44. procedure TextColor(color: byte);
  45.  
  46. procedure TextBackground(color: byte);
  47.  
  48. implementation
  49. {$L INFOPLUS}
  50.  
  51. {$F+}
  52.  
  53. procedure CPUID(var a: cpu_info_t); external;
  54.  
  55. function diskread(drive: byte; starting_sector: longint;
  56.   number_of_sectors: word; var buffer): word; external;
  57.  
  58. procedure longcall(addr: longint; var regs: registers); external;
  59.  
  60. function ATIinfo(data_in: byte; register: word): byte; external;
  61.  
  62. procedure AltIntr(intno: byte; var regs: registers); external;
  63.  
  64. procedure AltMsDos(var regs: registers); external;
  65.  
  66. function CTICK: byte; external;
  67.  
  68. function TsengCK: byte; external;
  69.  
  70. function ZyMOSCK: byte; external;
  71.  
  72. function CirrusCK: byte; external;
  73.  
  74. {$F-}
  75. {These first two procedures filter the color commands to allow Black&White}
  76. procedure TextColor(color: byte);
  77.   var
  78.     temp: byte;
  79.   begin
  80.   if mono then
  81.     begin
  82.     case (color and $0F) of
  83.       0: temp:=0;
  84.       1..7: temp:=7;
  85.       8..15: temp:=15
  86.       end;
  87.     if color > 15 then
  88.       temp:=temp + Blink;
  89.     end
  90.   else
  91.     temp:=color;
  92.   Crt.TextColor(temp)
  93.   end; {TextColor}
  94.  
  95. procedure TextBackground(color: byte);
  96.   var
  97.     temp: byte;
  98.   begin
  99.   temp:=color;
  100.   if mono and (color < 7) then
  101.     temp:=0;
  102.   Crt.TextBackground(temp);
  103.   end; {TextBackground}
  104.  
  105. end.