File: SI43NS.PA of Disk: Disks/Build-2007/Make-11-03-07
(Source file text) 

/SYS.IND. M43 NONSYS HANDLER
/
/
/
/
/
/COPYRIGHT  (C)  1980   BY WVDMARK, ZURICH
/
/
/
/
/WVDM, ZURICH, 1-SEP-80
/
/
/OS/8 V3 NON-SYS HANDLER FOR MOD 43

/ORIGIN:/SYSTEM INDUSTRIES, INC.
	/535 DEL REY AVENUE
	/SUNNYVALE, CALIFORNIA  94086

/THIS HANDLER WILL SUPPORT TWO
/SERIES 43 DISK DRIVE ON PORT 0 & 1
/OF A 3040 DISK CONTROLLER
/RK(A-B)0 AND RK(A-B)2 RESIDE ON THE
/FIXED PLATTERS
/RK(A-B)1 AND RK(A-B)3 ARE ON THE
/REMOVABLE PLATTERS
/RAL 6/74
/WVDM 9/74
/NEW DATE: 1-SEP-80

		VERSION="N&77
DCODE=50			/CONTROLLER DEVICE CODE

DSDD=10^DCODE+6001
DLCR=10^DCODE+6002
DCSR=10^DCODE+6004
DSDE=10^DCODE+6011
DLSR=10^DCODE+6012
DSRR=10^DCODE+6013
DLTR=10^DCODE+6014
DWCA=10^DCODE+6017

DOFF=146^40
UNIT0=0^10
UNIT1=1^10
PLATTER=1^2
TEMP=DKTR1
DKERCT=DK0
DKWD1=DKNO
BSW=7002
		/HEADER BLOCK
*0
-10				/10 (8) DEVICES

DEVICE SIDK;	DEVICE RKA0;	4400;	DK0+0-200;	ZBLOCK 2
DEVICE SIDK;	DEVICE RKB0;	4400;	DK0+1-200;	ZBLOCK 2
DEVICE SIDK;	DEVICE RKA1;	4400;	DK0+2-200;	ZBLOCK 2
DEVICE SIDK;	DEVICE RKB1;	4400;	DK0+3-200;	ZBLOCK 2
DEVICE SIDK;	DEVICE RKA2;	4400;	DK0+4-200;	ZBLOCK 2
DEVICE SIDK;	DEVICE RKB2;	4400;	DK0+5-200;	ZBLOCK 2
DEVICE SIDK;	DEVICE RKA3;	4400;	DK0+6-200;	ZBLOCK 2
DEVICE SIDK;	DEVICE RKB3;	4400;	DK0+7-200;	ZBLOCK 2
	*200
DKE,	0		/DON'T MOVE!!!
DKHLP,	DLCR		/SET CONTROLLER BREAK FIELD
	DCSR		/CLEAR STATUS
	JMS DKTR1	/GET POINTER
DKTR1,	0		//ALSO USED AS TEMP BUFF
	TAD DKTR1
	TAD (DKWCT-DKTR1
	DWCA
	CLA CLL
	TAD (DLTR
	DCA DKIOU	/SET UP FOR READ
	TAD DKWD1
	SPA
	ISZ DKIOU	/CHANGE TO WRITE
	BSW
	AND (7000	/GET DATA BUFFER FIELD
	DCA TEMP
DKST2,	HLT		/GET CONTROL TABLE ENTRY
	DCA DKWCT+3
	TAD DKWCT+3
	AND (10
	TAD TEMP
	DLCR		/EMA + UNIT
	CLA CLL
	TAD DKWCT+2
	AND (17
	DLSR		/OUTPUT SECTOR ADDRESS
	CLL CLA
	TAD DKWCT+2
	AND M20
	TAD DKWCT+3
	RTR;RTR		/13 BIT WORD
DKIOU,	HLT		/OUTPUT TRACK ADDRESS AND PLATTER
	CLL CLA
	DSDD
	JMP .-1		/WAIT FOR DISK TO FINISH
DKTAD,	TAD DK7600
	KRS		/CHK. FOR ^C
	TAD (-7603
	SNA CLA
	KSF
	JMP DCTL1
DKCDI,	CIF CDF 0
	JMP I DK7600
DCTL1,	DSDE		/WAS THERE A DISK ERROR?
	JMP DKNORM	/NO, GO EXIT
	ISZ DKERCT
	JMP DKHLP
	CLL CML
	JMP DKERR	/AVOID EXIT FIXER
DKNO,	0
DKWCT,	0
	0
	0
	0

/THIS IS REAL ENTRY CHAIN

	IFNZRO 270-. <NZERR>	/DK ENTRY POINTS 70-77

DK0,	VERSION
	ISZ DKNO
	ISZ DKNO
	ISZ DKNO
	ISZ DKNO
	ISZ DKNO
	ISZ DKNO
	ISZ DKNO

DK7600,	7600		/CLEAR AC
	TAD DKNO
	CMA
	TAD DKTAD
	DCA DKST1
	TAD DKST1
	TAD (DKOFFS-DK0
	DCA DKST2
	CLA CLL CML RTR	/=2000
	TAD DKST1
	DCA DKOUT	/SET UP ENTRY RESTORE
DKST1,	HLT		/GET CALLER ADDRESS
	DCA DKE		/PUT IT IN A CANONICAL LOCATION
	RDF		/FIND OUT CALLER'S FIELD
	TAD DKCDI
	DCA DKFLD	/FIX UP EXIT FOR FIELD CHANGING
	TAD I DKE	/
	DCA DKWD1
	ISZ DKE
	TAD I DKE
	DCA DKWCT+1	/SAVE CORE ADDRESS
	ISZ DKE
	TAD I DKE	/BLK #
	DCA DKWCT+2	/PICK UP ALL THE ARGUMENTS
	ISZ DKE		/PARTIALLY FIX THE EXIT
/STILL MORE INITIALIZATION TO DO

	TAD DKWD1
	AND DK3700
	CLL RAL
	DCA DKWCT	/GENERATE WORD COUNT FOR DATA X-FER
	TAD M20		/THIS SEEMS QUITE LARGE
	DCA DKERCT	/FOR ERROR COUNT
	TAD DKWCT+2
	TAD LGLBLK	/CHECK FOR LAST LEGAL BLK
	SZL CLA
	JMP DKERR	/FATAL:LINK ON
	JMP DKHLP	/GO DO REAL WORK


DKNORM,	CLA CLL
	ISZ DKE		/EXIT CONTROL - NORMAL EXIT
DKERR,	TAD (ISZ DKNO
DKOUT,	HLT		/RESET ENTRY ISZ
	DCA DKNO
	CLA RAR
DKFLD,	HLT		/CHANGE BACK TO CALLERS FIELD
	JMP I DKE	/EXIT

DK3700,	3700
M20,	-20
LGLBLK,	-6260		/- LENGTH OF RK COMPATIBLE DISK

/EQUATION FOR DKOFFS IS:
/	TRACK OFFSET*40+PLATTER BIT*2+UNIT BIT*10
/	PLATTER BIT IS 1 FOR REMOVABLE PLATTER, 0 FOR FIXED
/	UNIT BIT IS 0 FOR UNIT 0, 1 FOR UNIT 1
/	\OOO\OOO\OHU\0P0\

DKOFFS,	UNIT0			/RKA0
	UNIT0+DOFF		/RKB0

	UNIT0+PLATTER		/RKA1
	UNIT0+PLATTER+DOFF	/RKB1

	UNIT1			/RKA2
	UNIT1+DOFF		/RKB2

	UNIT1+PLATTER		/RKA3
	UNIT1+PLATTER+DOFF	/RKB3
	PAGE
	$$$$