home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / desqview / dvintf.pas < prev    next >
Pascal/Delphi Source File  |  1994-03-04  |  2KB  |  65 lines

  1. program DV_Intf;    {DesqView interface}
  2. { these are Turbo routines to talk to DesqView from a program that
  3.     writes directly to screen }
  4. var
  5.        test: integer;
  6.        MsDosRegs: RECORD
  7.           CASE INTEGER OF
  8.              1: (
  9.                 AX, BX, CX, DX, BP, SI, DI, DS, ES, Flags: INTEGER);
  10.              2: (
  11.                 AL, AH, BL, BH, CL, CH, DL, DH: BYTE);
  12.           END;
  13. function DV_check : boolean;
  14. begin
  15.           with msdosregs do BEGIN
  16.                AX := $2B01;
  17.                CX := $4445;  {'DE'}
  18.                dx := $5351;  {'SQ'}
  19.                msdos(msdosregs);    {using 'desq' for date gives result}
  20.                DV_CHECK := (al <> $ff); {if al <> $ff then DQ is running}
  21.                end;
  22.           end;
  23.  
  24. function DV_GET_Buffer(dispseg: integer) : integer;
  25.  
  26. begin
  27.      with msdosregs do begin
  28.                if DV_check then begin
  29.                   es := dispseg;
  30.                   di := 0;      {setup buffer address to disp buffer}
  31.                   ax := $fe00;
  32.                   intr($10,msdosregs);
  33.                   dv_get_buffer := es;
  34.                   end
  35.               else dv_get_buffer := dispseg;
  36.               end;
  37.          end;
  38. begin
  39. if DV_check then begin
  40.    test := dv_get_buffer($b800);
  41.    end;
  42. end.
  43. P, SI, DI, DS, ES, Flags: INTEGER);
  44.              2: (
  45.                 AL, AH, BL, BH, CL, CH, DL, DH: BYTE);
  46.           END;
  47. function DV_check : boolean;
  48. begin
  49.           with msdosregs do BEGIN
  50.                AX := $2B01;
  51.                CX := $4445;  {'DE'}
  52.                dx := $5351;  {'SQ'}
  53.                msdos(msdosregs);    {using 'desq' for date gives result}
  54.                DV_CHECK := (al <> $ff); {if al <> $ff then DQ is running}
  55.                end;
  56.           end;
  57.  
  58. function DV_GET_Buffer(dispseg: integer) : integer;
  59.  
  60. begin
  61.      with msdosregs do begin
  62.                if DV_check then begin
  63.                   es := dispseg;
  64.                   di := 0;      {setup buffer address to disp buffer}
  65.                   ax