mirror of
https://github.com/antoinevignau/source.git
synced 2025-01-07 22:32:55 +00:00
1 line
24 KiB
Plaintext
1 line
24 KiB
Plaintext
|
;*******************************************************
;
; SCSI Driver Set Configuration Parms code.
;
; Written by Matt Gulick. Started June 22,1990
;
; Copyright Apple Computer, Inc. 1990
;
;*******************************************************
;*******************************************************
;
; This file contains the Set Configuration Parms as
; defined in the ERS.
;
;*******************************************************
;*******************************************************
;
; Revision History:
;
;*******************************************************
; June 22, 1988 File started.
EJECT
IMPORT ddm_data
;*******************************************************
;
; 's_config_parms'
;
; This routine is used to set information about the
; volume or disk in question. If this call is issued
; to set disk info, then the DIB Pointer must point to
; the head DIB if this is a linked device. Volume
; calls should have the DIB Pointer set to the volume
; for which the information is being requested.
;
; The structure of the parameter list is defined in the
; SCSI Driver ERS. The parameters are going to depend
; greatly on the type of device that this driver is
; written for. That means that the info for the Scanner
; will not be the same in any form as that for a Hard
; Disk, or a Tape drive. These calls will be particular
; for the device type supported.
;
; Called via 'JSR'
;
; Inputs: [dib_ptr] = Target DIB (LONG)
; [buff_ptr] = Data Buffer Pointer (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.
;
;*******************************************************
scp
;
; Check the Request Count. Volume calls
; need at least 4 bytes. Disk calls need
; more and that will be verified there.
;
lda <rqst_cnt+2
bne @rqst_cnt_ok
lda <rqst_cnt
cmp #$0004
blt @bad_cnt
;
; Do a mini check of the parameter list
; to see if it is correct.
;
@rqst_cnt_ok lda [buff_ptr] ;Is the Request Count = 0?
beq @exit_none ;Yes. Send Zero
cmp #$0002 ;Is the count bigger than the min
blt @exit_parm ;Overhead Structure? No? Parm Error.
;
; Check to see if this Volume is Online.
;
ldy #dib.dvcflag
lda [dib_ptr],y
and #dvc_hardofl
bne @not_online
;
; Validate that this DIB is from
; a Partition Map Entry.
;
ldy #dib.start_blk
lda [dib_ptr],y
ldy #dib.start_blk+2
ora [dib_ptr],y
beq @exit_parm
;
; Check Bitmap.
;
ldy #config_pl.bitmap
lda [buff_ptr],y
bmi @do_volume
brl do_disk
;
; Not from a partition.
;
@not_online lda #drvr_off_line
bra @exit_none
;
; Error exit point.
;
@bad_exit jsr set_our_dp
lda #drvr_io
bra @exit_none
;
; Error exit point.
;
@bad_cnt lda #drvr_bad_cnt
bra @exit_none
;
; Use this code to exit when no data is
; being returned.
;
@exit_parm lda #drvr_bad_parm
@exit_none stz <trans_cnt
stz <trans_cnt+2
cmp #$0001
rts
;
; Do the Volume Parms Here.
; Acc = Bitmap on entry.
;
@do_volume sta |bitmap
and #vconf_resv2++\
vconf_resv3++\ ;Check Bits that are not supported
vconf_resv4++\ ;at this time.
vconf_resv5++\
vconf_resv6
bne @exit_parm ;If unsupported bit set then error out.
;
; Check for Remount
|