SECTION 2
Supporting DOS Applications
2-10 PEN*KEY
R
6200/6300 Hand-Held Computer Programmer’s Reference Guide
INT 21h API: DOS System API
"
NOTE:
If NPOWER is disconnected, this interrupt is not intercepted.
This interrupt is intercepted as a means of monitoring when the system is busy.
A lookup table determines which system function represents activity. For each of
the functions whose AH values are marked in that table, NPOWER performs a
read from a system busy port" prior to passing that function on to DOS for
execution. The default value used as the system busy port" is 3ffh; the scratch
pad register for COM1. This default can be changed automatically by the APM
BIOS, simply by supporting the APM OEM BIOS extension Int 15h, AX=5380h,
BX=C200h. This is a relatively new addition to the portable APM OEM BIOS
specification, so it is expected that it is not supported at first, thus the need for a
default port value to use when the function call is not supported.
Function 40h (Write to File or Device) is handled somewhat differently. With
that function, BX is also checked to see which file handle is used. Only those file
handles greater than or equal to three denote system activity. In other words,
writing to stdout is not recorded as activity.
The lookup table is used by INT 28h to determine when idling is performed. For
functions between 00h and 0Ch, the lookup value is saved each time a call is
intercepted. See INT 28h for how that value is used.
INT 28h API: DOS Idle API
This interrupt is issued by DOS from the standard input/output functions
whenever it believes that it is idle. Unfortunately, that includes situations such
as the time spent polling on a COM port when data is being sent to or received
from a COM port, as in the case where the console is redirected via TTY. Thus, a
write string call directed to a COM port would run very slowly if idling occurred
every time INT 28h is invoked.
If NPOWER is disconnected, this interrupt is not
intercepted.
To prevent a slow down, INT 28h looks at the value saved by INT 21h to
determine which function was last performed. Only those DOS functions that
perform input from the console are allowed to cause idling out of INT 28h. By
modifying that saved value under some circumstances, INT 28h idles if:
"
The last recorded DOS call is an input function and at least two INT 28h
calls have been issued since that time. The second call is first to idle.
"
If the last recorded DOS call was function 0Ch (Flush Buffer and Read
Standard Input), idling occurs with the first INT 28h call received.
Note only those DOS calls in the range of 00h through 0Ch are even recorded.
These DOS function calls represent the functions to be recorded as activity:
AH
AL Function description
11
Find first matching file using FCB
12
Find next matching file using FCB
13
Delete file using FCB
14
Sequential read from FCB file
15
Sequential write to FCB file
16
Create or truncate file using FCB
17
Rename file using FCB
21
Read random record from FCB file
22
Write random record to FCB file
27
Random block read from FCB file
2. DOS
Applications