New ADFS SWIs and service calls

;*********************************************************************

ADFS_ControllerType
;
; Returns the controller type of a disc ;
; Entry:
; R0 = drive number (0..7)
;
; Exit:
; R0 = controller type

;         0 => disc not present
;         1 => 1772
;         2 => 765
;         3 => ST506
;         4 => IDE

;*********************************************************************

ADFS_PowerControl
;
; Controls the power-saving features of the ADFS system ; It can be dangerous to use the drive spin control SWIs on drives that do ; not fully support them: the controllers on at least two drives tested hang ; up when autospindown is enabled and a reset does not recover the situation ; (power-on reset does).
;
; Entry:
; R0 = reason
;

;         0 => read drive spin status
;           Entry:
;              R1 = drive (4..7)
;           Exit:
;              R2 = 0 => drive is not spinning
;                  !0 => drive is spinning
;
;         1 => set drive autospindown
;           Entry:
;              R1 = drive (4..7)
;              R2 =  0 => disable autospindown and spinup drive
;                   !0 => set autospindown to R2*5 seconds
;           Exit:
;                 R3 = previous enable value
;
;         2 => manual control of drive spin without affecting autospindown
;           Entry:
;              R1 = drive (4..7)
;              R2 = 0 => spin down immediately
;                  !0 => spin up immediately

;*********************************************************************

ADFS_SetIDEController
;
; Gives the IDE driver the details of an alternative controller. ;
; Entry:
; R2 -> IDE controller
; R3 -> interrupt status of controller ; R4 = AND with status, NE => IRQ ; R5 -> interrupt mask
; R6 = OR into mask enables IRQ
; R7 -> data read routine (0 for default) ; R8 -> data write routine (0 for default) ; SB -> static workspace
;
; Exit:
; VS => error

;          R0 = error
; VC => no error
;          R0 preserved
; All other registers preserved

;*********************************************************************

ADFS_IDEUserOp
;
; Direct user interface for low-level IDE commands. ; Must not be called in background.
;
; Entry:
; R0 = b0 = action

;              1 => reset controller
;              0 => process command
;         b25..b25 = transfer direction
;              00 => no transfer
;              01 => read
;              10 => write
;              11 reserved
; R2 -> parameter block for command and results ; R3 -> buffer
; R4 = length to transfer
; R5 = timeout in centiseconds (0 = default) ; SB -> static workspace
; MODE: SVC
; IRQ state: unknown
;
; Exit:
; VS => error
;          R0 -> error block
; VC => no error
;          R0 = command status (0 or a disc error number)
;          Parameter block updated
; R3 updated
; R4 updated
; R5 undefined
; All other registers preserved
; IRQ state: preserved but IRQs enabled during call

;*********************************************************************

Service_ADFSPoduleIDE
;
; Issued by ADFS to locate an IDE podule. ;
; Entry:
; R1 = Service_ADFSPoduleIDE
; R2 -> current IDE controller
; R3 -> interrupt status of controller ; R4 = AND with status, NE => IRQ ; R5 -> interrupt mask
; R6 = OR into mask enables IRQ
; R7 -> data read routine (0 for default) ; R8 -> data write routine (0 for default) ;
; Exit:
; R1 = Service_Serviced
; R2 -> new IDE controller
; R3 -> interrupt status of controller ; R4 = AND with status, NE => IRQ ; R5 -> interrupt mask
; R6 = OR into mask enables IRQ
; R7 -> data read routine (0 for default) ; R8 -> data write routine (0 for default)

;*********************************************************************

Service_ADFSPoduleIDEDying
;
; Issued by podule module to tell ADFS of imminent demise. ;
; Entry:
; R1 = Service_ADFSPoduleIDEDying
;
; Exit:
; All registers preserved

;*********************************************************************