|1Bh||DV$VECT||call a device vector|
|Input||A register - device number to call.
B register - vector number.
|Output||- none -|
This service will search the devices in the PERMANENT cell for a device whose device number matches that in the A register. If no device is found then the device not present error is returned.
Then the service checks that the vector number in the B register is not greater than the maximum vector number supported by the device. If it is, then an invalid device call error is returned. Otherwise the appropriate vector is loaded from the device vector table and a JMP is done to the vector.
DV$VECT passes the X register and the scratch register UTW_S0 through to the vectored routine, so that these may be used to pass parameters to the device vector routine. It is up to the device to specify what is passed and what is returned. DV$VECT returns the same things as the vectored routine.
To send a string in the X register using the RS232 interface the
following code fragment can be used:
CALL_LPRINT: PSHX ; SAVE THE STRING TO BE PRINTED LDX #LPRINT_NAME ; POINT TO LPRINT OS DV$LKUP ; SEARCH FOR RS232 DEVICE PULX ; RESTORE THE STRING BCS ERROR ; UNABLE TO HANDLE LPRINT OS DV$VECT ; EXECUTE THE LPRINT SERVICE BCS ERROR ; SERVICE FAILED RTS ; STRING NOW PRINTED LPRINT_NAME: ASCIC "LPRINT"The LPRINT handler in the RS232 interface requires the string to be printed to be a leading byte count string and the address of the string must be in the X register.
|Errors||231 - vector number not supported.
230 - device not present.
any others the device may return.