Specifications

System Macros Invoked by Drivers
SPI$CONNECT
The port driver returns the maximum allowed value (SPDT$L_MAXBYTECNT)
in R1 to the class driver in response to the class driver’s invocation of the
SPI$CONNECT macro. Some devices, typically tape drives, need to utilize the
full value of SPDT$L_MAXBYTECNT. Most devices, such as disk drives, can
better utilize resources with a smaller (suggested) byte count per DMA transfer.
The class driver can derive the suggested byte count by utilizing a divisor value
in bits <31:25> of the port capability mask (SPDT$L_PORT_FLAGS longword)
returned by SPI$CONNECT in R3. For example, if the maximum byte count is
64K and the divisor is 4, then the class driver calculates the suggested byte count
as 16K. A sample code sequence (that follows the execution of SPI$CONNECT)
for the class driver to calculate the suggested byte count is shown below:
:**********************************************************
; After SPI$CONNECT execution, R3 contains divisor value in
; <31:25> and R1 contains MAXBYTECNT
ASHL #-24,R3,R3 ;Shift divisor value to low-order byte of R3
DIVL3 R3,R1,R0 ;Divide MAXBYTECNT (R1) by divisor (R3) and
;place suggested byte count in R0
2–72