Subroutines > Detailed Descriptions > MIAMEX

MIAMEX 19: Get device definition

xcall MIAMEX, MX_GETDEV, dev, proj, prog, drbase, status

This operation is very similar to the MIAMEX 11 MX’GETERSATZ operation, but is used to retrieve information about the real defined devices, and not the ERSATZ devices. These are the devices defined with the DEVICE= command in the MIAME configuration file, miame.ini. For more information, see the DEVICE system parameter.

Parameters

The status parameter is a 6-byte floating point in which a value of one is returned if the end of the device list is reached, in which case the rest of the parameters do not contain valid data. On the next call, information on the first device will be returned, and then the second, and so on. In these cases the value of status will be zero. As with the MIAMEX 11 MX’GETERSATZ operation, a short-cut is available to reset to the first device. In this case, if the dev parameter is a null string, then information on the first device will be returned; it is not necessary to go around a loop waiting for a returned status of one.

dev is a six-character string into which the device name (comprising drive name and drive number) is returned.

As of A-Shell 4.9.897, proj and prog may be either single or double byte binaries. If the device definition is one for an explicit PPN, then these will contain the project number and programmer numbers respectively. If single byte binaries are specified, the PPN information will be encoded in octal (with a range of 0-377). (This is for backwards compatibility with the old octal PPN system.) Any new programs should use two-byte binaries for the proj and proj parameters, in which case they will be returned encoded as decimal, ready for printing or converting to strings without the need for any octal-to-decimal logic.

drbase should be a 100+ character string into which the base pathname for the device or device/PPN combination is returned. This pathname will terminate in a directory separator character.