home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TPDDOS11.ZIP / ABSDDOS.INT < prev    next >
Encoding:
Text File  |  1992-10-02  |  2.7 KB  |  133 lines

  1. Unit ABSDDOS;
  2. {
  3.   DoubleDOS Routines for TP 6.0
  4.  
  5.   Copyright (c) 1992 A.B.S. - ALL RIGHTS RESERVED
  6.  
  7.   1.00
  8.   1.10  Minor Optimizations
  9. }
  10.  
  11. {$A+,B-,D-,F+,I-,N-,O-,R-,S-,V-}
  12.  
  13. Interface
  14.  
  15. Const
  16.   ABSDDOSVer  = '1.10';
  17.  
  18. Function  Check4DDOS : Boolean;
  19. {
  20.  Returns True if DoubleDOS is Detected
  21. }
  22.  
  23. Function  DDOS_Visible : Boolean;
  24. {
  25.  Returns True if Current Task is DoubleDOS Visible Task
  26.  Returns False if Current Task is DoubleDOS Invisible Task
  27. }
  28.  
  29. Procedure DDOS_SwitchTasks;
  30. {
  31.  Swaps the Visible and Invisible Tasks
  32. }
  33.  
  34. Procedure DDOS_SuspendInvisible;
  35. {
  36.  Suspends the Invisible Task
  37. }
  38.  
  39. Procedure DDOS_ResumeInvisible;
  40. {
  41.  Resumes the Invisible Task
  42. }
  43.  
  44. Procedure DDOS_KillOtherTask;
  45. {
  46.  Kills the other task
  47. }
  48.  
  49. Procedure DDOS_ClearCurrentKeyBuf;
  50. {
  51.  Clears the Keyboard Buffer for the Current Task
  52. }
  53.  
  54. Function  DDOS_SendCharOther(C : Char) : Boolean;
  55. {
  56.  Sends a Character to the Keyboard Buffer of the Other Task
  57. }
  58.  
  59. Function  DDOS_SendCharCurrent(C : Char) : Boolean;
  60. {
  61.  Sends a Character to the Keyboard Buffer of the Current Task
  62. }
  63.  
  64. Procedure DDOS_TimeSlices(Slices : Byte);
  65. {
  66.  Gives up Slices number of Time Slices
  67. }
  68.  
  69. Procedure DDOS_TimeSlice;
  70. {
  71.  Gives up one time slice
  72. }
  73.  
  74. Procedure DDOS_PreventSwitching;
  75. {
  76.  Prevents Task Switching
  77. }
  78.  
  79. Procedure DDOS_ResumeSwitching;
  80. {
  81.  Resumes Task Switching
  82. }
  83.  
  84. Function  DDOS_OtherProgramStatus : Byte;
  85. {
  86.  Returns the Status of the Other Task:
  87.    0 - no program in other partition
  88.    1 - program in other partition is running
  89.    2 - program in other partition is suspended
  90. }
  91.  
  92. Procedure DDOS_TimeShareSet(Flag : Byte);
  93. {
  94.  Sets the Time Sharing Status:
  95.    0 - visible program gets 70% invisible gets 30% (default)
  96.    1 - visible program gets 50% invisible gets 50% of time
  97.    2 - visible program gets 30% invisible gets 70% of time
  98.    3 - top program gets 70% bottom program gets 30% of time
  99.    4 - top program gets 30% bottom program gets 70% of time
  100. }
  101.  
  102. Function  DDOS_TimeShareStatus : Byte;
  103. {
  104.  Returns the Current Time Sharing Status, as Listed Above
  105. }
  106.  
  107. Function  DDOS_SetKeyFlags(Task : Byte; Flags : Word) : Word;
  108. {
  109.  Task = 0 for current, 1 for other
  110.  
  111.  Sets the Keyboard Control Flags:  (bit set enables, cleared disables)
  112.    bit 0: menu
  113.    bit 1: exchange
  114.    bit 2: entire keyboard enable/disable
  115.    bit 3: Ctrl-C
  116.    bit 4: Ctrl-PrtSc
  117.    bit 5: Alt/Erase
  118.    bit 6: Ctrl-Break
  119.    bit 7: Ctrl-NumLock
  120.    bit 8: shift-PrtSc
  121.    bit 9-13: undefined
  122.    bit 14: cancel key (clear keyboard buffer)
  123.    bit 15: suspend key
  124.  
  125.  Returns - Previous Flags
  126. }
  127.  
  128. Function  DDOS_VirtualBuffer : Word;
  129. {
  130.  Returns the Segment of the Display Buffer.  This can change if multitasking
  131.  is enabled.
  132. }
  133.