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

1 line
46 KiB
Plaintext
Raw Normal View History

;******************************************************* ; ; SCSI Driver 'Status' filter. ; ; Written by Matt Gulick. Started August 12,1988 ; ; Copyright Apple Computer, Inc. 1988-93 ; All Rights Reserved ; ;******************************************************* ;******************************************************* ; ; This file contains the 'Status' filter as defined ; in the ERS. ; ;******************************************************* ;******************************************************* ; ; Revision History: ; ;******************************************************* ; ; Aug 12, 1988 File started. ; April 17, 1989 Made changes to accomadate the ; Scanner Driver. ; ; *** System 6.0.1 *** ; ; 16-Feb-93 Jim Murphy added DStatus $4000 ; to return SCSI ID (search for ; JCM). ; ;******************************************************* STRING PASCAL BLANKS OFF PAGESIZE 70 PRINT NOGEN PRINT NOMDIR MACHINE M65816 IMPORT bitmap IMPORT rpm_blk_num IMPORT stat_cont IMPORT rebuild IMPORT read_pm_blk IMPORT call_type IMPORT main_drvr IMPORT internal IMPORT f_partition IMPORT test_unit_rdy IMPORT rqst_sense IMPORT mode_sense IMPORT read_capacity IMPORT t_dvc_blocks IMPORT set_512_mode IMPORT open_flag IMPORT set_our_dp IMPORT disk_switch IMPORT set_disk_sw IMPORT rebld_dibs IMPORT unit_state IMPORT trash_it IMPORT uses_dc IMPORT dib_data_struct IMPORT lst_rslt_ec ;Status IMPORT lst_rslt_id ;Status IMPORT lst_rslt_stat ;Status IMPORT lst_rslt_skey ;Status IMPORT lst_rslt_info ;Status IMPORT lst_rslt_rqlen ;Status IMPORT lst_rslt_scode ;Status IMPORT sense_data IMPORT auto_sense_data IMPORT internal_buff IMPORT display_cnt IMPORT current_fmt IMPORT opt1_blk_cnt IMPORT opt1_blk_siz IMPORT opt1_med_siz IMPORT opt2_blk_cnt IMPORT opt2_blk_siz IMPORT opt2_med_siz IMPORT opt3_blk_cnt IMPORT opt3_blk_siz IMPORT opt3_med_siz IMPORT format_options IMPORT check_532_rw ENTRY dvc_status ENTRY g_config_parms ENTRY wait_status ENTRY fmt_options ENTRY read_p_map ENTRY g_last_rslt ENTRY get_target_priority PRINT OFF INCLUDE 'scsihd.equates' INCLUDE 'M16.MEMORY' INCLUDE 'M16.UTIL' PRINT ON ;------------------------------------------------------------------------------- IF scsi_dtype = direct_acc THEN ENTRY gdp ENTRY gvp ENDIF ;------------------------------------------------------------------------------- EJECT ;******************************************************* ; ; Main Entry point to the 'Status' filter. This ; "Filter" is called when a Status Command comes in. ; See the headers of the seperate sections for the ; details of the commands. ; ; Inputs: [dib_ptr] = Last DIB built (LONG) ; Acc = Unspecified ; Carry = Unspecified ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Outputs: Acc = DRVR_BUSY ; Carry = 1 ; unless we have no more dibs then ; Acc = 0 ; Carry = 0 ; ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = GS/OS Direct Page ; Data Bank = Ours ; ; Errors: See Spec. ; ;******************************************************* EXPORT status status PROC ; ; Check to see if this is a Get Last Result ; call. If so, then don't worry yet about ; getting the Unit State. ; lda <cont_code cmp #$0005 beq @status *** Added - 16-Feb-93 JCM cmp #$4000 ;how about GetSCSITargetPriority? beq @status *** End - 16-Feb-93 JCM ; ; Is the device Removable? ; ldy #dib.dvcchar lda [dib_ptr],y and #removable beq @online ;No. ; ; This devic