antoine-source/scsi2/SCSI.Drivers/SCSI Filter control

1 line
46 KiB
Plaintext
Raw Normal View History

;******************************************************* ; ; SCSI Driver 'Control' filter. ; ; Written by Matt Gulick. Started August 13,1988 ; ; Copyright Apple Computer, Inc. 1988,89 ; ;******************************************************* ;******************************************************* ; ; This file contains the 'Control' filter as defined ; in the ERS. ; ;******************************************************* ;******************************************************* ; ; Revision History: ; ;******************************************************* ; Aug 13, 1988 File started. STRING PASCAL BLANKS OFF PAGESIZE 70 PRINT NOGEN PRINT NOMDIR MACHINE M65816 IMPORT rpm_blk_num IMPORT wpm_blk_num IMPORT stat_cont IMPORT rebuild IMPORT read_pm_blk IMPORT write_pm_blk IMPORT call_type IMPORT internal IMPORT main_drvr IMPORT f_partition IMPORT direct_page IMPORT gsos_dpage IMPORT internal_buff IMPORT set_our_dp IMPORT chk_lnk_offline IMPORT set_disk_sw IMPORT leave_switched ; *** MSG 12/12/91 *** IMPORT disk_switch IMPORT rebld_dibs IMPORT unit_state IMPORT test_unit_rdy IMPORT trash_volume IMPORT trash_it IMPORT ko_cache IMPORT trans_flag IMPORT uses_dc IMPORT dib_data_struct IMPORT display_cnt IMPORT current_fmt IMPORT opt1_blk_cnt IMPORT opt1_blk_siz IMPORT opt1_interleave IMPORT opt1_med_siz IMPORT opt2_blk_cnt IMPORT opt2_blk_siz IMPORT opt2_interleave IMPORT opt2_med_siz IMPORT opt3_blk_cnt IMPORT opt3_blk_siz IMPORT opt3_interleave IMPORT opt3_med_siz IMPORT format_data IMPORT check_532_rw IMPORT sense_data IMPORT t_dvc_blocks IMPORT un_formatted ENTRY reset_dvc ENTRY eject ENTRY s_config_parms ENTRY s_wait_mode ENTRY format_opt ENTRY assign_part ENTRY arm_signal ENTRY disarm_sig ENTRY set_p_map ENTRY format_dvc PRINT OFF INCLUDE 'scsihd.equates' INCLUDE 'M16.MEMORY' INCLUDE 'M16.UTIL' PRINT ON ;------------------------------------------------------------------------------- IF scsi_dtype = direct_acc THEN ENTRY sdp ENTRY svp ENDIF ;------------------------------------------------------------------------------- EJECT ;******************************************************* ; ; Main Entry point to the 'Control' filter. This ; "Filter" is called when a Control Command comes in. ; See the headers of the seperate sections for the ; details of the commands. ; ; Called via 'JSR' ; ; Inputs: [dib_ptr] = Target DIB l (LONG) ; Acc = Unspecified ; Carry = Unspecified ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Returns via 'RTS' ; ; Outputs: Acc = 0 ; Carry = 0 ; or ; Acc = Error ; Carry = 1 ; ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Errors: See Spec. ; ;******************************************************* EXPORT control control PROC ; ; Check to see if this is a set Config call. ; If so, then don't worry yet about ONLINE ; or REMOVABLE. ; lda <cont_code cmp #$0003 beq @control ; ; Is the device Removable? ; ldy #dib.dvcchar lda [dib_ptr],y and #removable beq @online ;No. ; ; This device is removable. Now we ; need to check to see if the unit ; has gone offline, (then we need to ; report that to the OS) or if the ; unit has come back online (Rebuild ; the DIBs). ; jsr unit_state beq @online ;**** test Code **** bit |un_formatted ;**** test Code **** bpl @sec_out ;**** test Code **** ; bmi @rts_out