mirror of
https://github.com/antoinevignau/source.git
synced 2025-01-29 13:33:38 +00:00
1 line
38 KiB
Plaintext
1 line
38 KiB
Plaintext
|
;*******************************************************
;
; SCSI Driver Main Driver.
;
; Written by Matt Gulick. Started May 16,1988
;
; Copyright Apple Computer, Inc. 1988,89
;
;*******************************************************
;*******************************************************
;
; This file contains the code segment that is called
; when a Device call comes in. This code is
; responsible for checking the validity of the
; command, setting the environment and parsing the
; call to the desired filter.
;
;*******************************************************
;*******************************************************
;
; Revision History:
;
;*******************************************************
; May 16, 1988 File started.
; May 17, 1988 DIB Record defined.
; June 6, 1988 Main Driver Written.
; Jun 10, 1988 Broke down files into links.
; Jun 20, 1988 Add comments concerning Registers to the
; routine headers. Also incorporate
; changes from code review.
; July 8, 1988 Added code to allocate Directpage area
; of $100 bytes.
; Oct 25, 1988 Modified the default DIB to reflect the
; changes in the SCSI Manager Interface.
; Also made changes in the code to account
; for this.
;
; Apr 10, 1989 Started code for character devices. The
; Scanner Driver in particular.
;
; *** 6.0.1 ***
;
; 15-Dec-92 DAL Changed default bitmap for CD device, to
; support Apple CD-300.
;
; 6-Mar-93 JCM Added the new "driver wasn't written by a bonehead" bit to the
; default_dib characteristics for all drivers.
;
; BD 201811 Added commands in the bitmap for the Apple CD
;
STRING PASCAL
BLANKS OFF
PAGESIZE 70
PRINT NOGEN
PRINT NOMDIR
MACHINE M65816
IMPORT startup
IMPORT Open
IMPORT Read
IMPORT Write
IMPORT Close
IMPORT Status
IMPORT Control
IMPORT Flush
IMPORT Shutdown
IMPORT g_dib_ptr
ENTRY default_dib
ENTRY direct_page ;Driver Mgmt
ENTRY exit_dpage ;Driver Mgmt
ENTRY gsos_dpage ;Driver Mgmt
ENTRY lst_rslt_ec ;Status
ENTRY lst_rslt_id
ENTRY lst_rslt_stat
ENTRY lst_rslt_skey
ENTRY lst_rslt_info
ENTRY lst_rslt_rqlen
ENTRY lst_rslt_scode
ENTRY auto_sense_data ;Main Driver
EJECT
INCLUDE 'scsihd.equates'
PRINT OFF
INCLUDE 'M16.MEMORY'
INCLUDE 'M16.UTIL'
PRINT ON
;*******************************************************
;
; This dummy Procedure is used to inform the loader.
; Drivers start with data but are not data segments.
; The loader may load what it thinks to be a data
; segment accross bank boundries. This is not good
; for code.
;
;*******************************************************
EXPORT dummy
dummy PROC
ENDP
;*******************************************************
;
; Header as required by the device dispatcher for
; drivers.
;
;*******************************************************
EXPORT start
start PROC
dc.w default_dib-start
dc.w $0001
dc.w ctrl_list-start
ctrl_list dc.l null
dc.l null
ENDP
;*******************************************************
;
; Main entry to the SCSI Driver code segment. The
; state of the machine at this point is:
;
; Acc = Call Number
; $0000 = Startup
; $0001 = Open
; $0002 = Read
; $0003 = Write
; $0004 = Close
; $0005 = Status
; $0006 = Control
; $0007 = Flush
; $0008 = Shutdown
; Y register = Unspecified
; X register = Unspecified
; P register = 0=M=X=e
; Direct Page = GS/OS Direct Page
; Data Bank = Unspecified
; Stack Pointer = GS/OS Stack
; System Speed = Fast
;
;*******************************************************
EXPORT drvr_main
drvr_main PROC
;
; Diagnostic Flag
;
; sta >$ff0500
;
; Preserve Callers Data Bank
; and set ours.
;
phb
phk
plb
;
; Check to see if we have our own
; Direct Page. If so then copy first
; 'x' bytes to
|