-
Notifications
You must be signed in to change notification settings - Fork 0
/
mulaware.int
144 lines (119 loc) · 3.74 KB
/
mulaware.int
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
Unit MulAware;
{
Multitasking Routines for TP 6.0
Copyright (c) 1991,1992 A.B.S. - ALL RIGHTS RESERVED
1.00+ Internal Use Only
2.00 First Distributed Release
2.10 Fixed Windows Checking
2.11 Took out VMiX Code
2.20 Fixed DDOS Code - Locking up Novell
2.21 Fixed Code - Tried to be too smart for my own good
2.22 Fixed Code Again - Was Checking for DV 2.40+ instead of 2.26+
3.00 Complete ReWrite
3.01 Minor Update
3.10 Optimizations
}
{$A-,B-,D-,F-,I-,N-,O-,R-,S-,V-}
Interface
Const
MulAwareVer = '3.10';
Type
MultiType = (None, {No Supported MultiTasker Found}
DESQview, {DESQview 2.26+}
TopView, {TopView, TaskView, DESQview 2.00- 2.25,
OmniView, or Compatible}
TaskSwitcher, {MS DOS 5.0 Task Switcher or Compatible}
DoubleDOS, {DoubleDOS}
WinEnh, {MS Windows 3.x in Enhanced Mode}
Win386, {MS Windows 386 v2.xx}
WinStandard, {MS Windows in Real or Standard Mode}
OS2}; {OS/2 1.3 or 2.0}
Var
MultiTasker : MultiType;
Procedure TimeSlice;
{
Causes the current task to give up the rest of its time slice.
Useful in loops while waiting for keyboard input. This procedure
calls the DOS idle interrupt if MultiTasker = None.
example:
While not Keypressed do TimeSlice;
Supported by:
None
DESQview
WinEnh
OS2
DoubleDOS
TopView
Win386
TaskSwitcher
Win286
}
Procedure PreventSwitching;
{
Suspends multitasking and only services the current task. Useful during
critical program functions. Don't leave on for too long! Call
ResumeSwitching to resume multitasking.
Supported by:
DESQview
WinEnh
DoubleDOS
TopView
}
Procedure ResumeSwitching;
{
Called to resume multitasking after it has been suspended by
PreventSwitching.
Supported by:
DESQview
WinEnh
DoubleDOS
TopView
}
Function MulVersion : Word;
{
Returns the Version Number. The high byte contains the major number, and
the low byte contains the minor number. The number may be accessed like
this - WriteLn('Version ', Hi(MulVersion), '.', Lo(MulVersion)).
Example:
DESQview 2.42 returns $022A (554).
Supported by:
DESQview
WinEnh
OS2
TopView (returns 0 for TaskView & DESQview 2.00-2.25}
}
Function VirtualBuffer : Word;
{
Returns the address of the virtual video buffer. Useful for doing
direct screen writes without 'bleed through'. Under DoubleDOS, this
procedure must be called everytime you wish to do a direct write,
because the buffer changes. The standard video address is returned
under a non-supported multitasker. This is only valid for standard
text modes!
Supported by:
DESQview
DoubleDOS
TopView
}
Procedure TV_UpdateBuffer(Num : Word; Buffer, CharOffset : Word);
{
Must be called when running under TaskView or clones to update the
screen from the virtual buffer. This may be called under DESQview,
but doing so will cause DESQview to stop updating the screen
automatically. Num contains the number of sequential characters
that were changed. Buffer:CharOffset points to the first character
changed. Buffer is the VirtualBuffer. CharOffset is the Offset of
the first character changed.
Do NOT call with Num = 0!
Supported by:
DESQview
TopView
}
Function DDOS_Visible : Boolean;
{
Returns true if the current task is the visible task under DoubleDOS.
Returns false if DDOS NOT running OR if the current task is the
invisible task. You must check MultiTasker if a false is returned.
Supported by:
DoubleDOS
}