Entry | |
---|---|
R0 | Driver Info Block |
R1 | 157 (&9D) |
R2 | Status (0 if starting, 1 if terminating) |
R3 | DCI version supported |
Exit | |
---|---|
R0 | Preserved |
R1 | Preserved |
R2 | Preserved |
R3 | Preserved |
This service is issued by a driver when it starts or exits.
This service call must not be claimed.
When a protocol module receives this service call from a driver that is starting up (ie R2 = 0), it should add the driver to its list of device drivers. When a protocol module receives the call from a driver that is terminating (ie R2 = 1), it should scan its list of
device drivers for a driver information block matching the one addressed by R0, and remove the corresponding driver from the list.
You may instead decide to keep a terminating driver on the list, but to mark it as inactive in case it later restarts. If you do this, you must not match driver information blocks by comparing their addresses, as when a driver restarts the block may well be in a different
location. You instead have to match fields within the driver information block: the short name and unit number (at offsets 4 and 8 respectively) together uniquely identify a driver information block, and so a match of them is sufficient.