/1	OV0 FOR RESORC

	.ENTRY VERSN,SIZE,BLOCK,ENTRY,MODE
	.EXTERNAL GETTYP,DPRINT,OPRINT,PUTSP,PUTO
	.EXTERNAL SLOTAB,PRINT
	PDHRT=37
	PDCWT=31
	PTYP=32
	INPBL0=5600
	PDHIT=30
	INPHND=4000
	BLOC=36

	.RSECT OV3,LEVEL=1,OVERLAY=0
	FIELD 1

VERSN,	0
	JMS PUTSP
	TAD BLOC
	SNA CLA
	JMP SYSV	/TEMP (ENTRY PT IS IN FIELD 1 7600
	TAD I PDHIT
	AND (177
	TAD BLOC
GOVR,	DCA DTM
	JMS GETV
	CLL IAC
	TAD (-34
	SZL CLA
	JMP NOOOP
	JMS GETV
PUTVR,	SZA
	TAD (40
	TAD (40
	JMS PUTO
	JMP I VERSN

OTEM,
GETV,	0
	CDF 0
	TAD I DTM
	CDF 10
	JMP I GETV

NOOOP,	STA
	TAD DTM		/SCAN BACKWARDS FOR HANDLER VERSION # (LT 33)
	JMP GOVR

SYSV,	TAD I PDHRT
	AND (177
	TAD (INPBL0+200
	DCA DTM
	TAD I DTM
	CLL
	TAD (-34
	SNL CLA
	TAD I DTM	/PRINT BAD VERSION # AS SPACE
	JMP PUTVR
DTM,	0
SIZE,	0
	JMS GETTYP
	CIA
	CLL
	JMS DPRINT
	JMS PUTSP
	ISZ PTYP	/POINT TO KIND SUBROUTINE
	JMP I SIZE
MODE,	0
	JMS PUTSP
	TAD (-4
	DCA MKNT
	TAD I PDCWT
	RTL
	RAL
	JMS MSET
	"R
	TAD I PDCWT
	RTL
	JMS MSET
	"W
	TAD I PDCWT
	RAL
	CML
	JMS MSET
	"F
	JMS PUTSP
	ISZ MKNT
	JMP .-3
	JMP I MODE

MSET,	0
	CLA
	TAD I MSET
	DCA MCHAR
	ISZ MSET
	SZL
	JMP I MSET
	ISZ MKNT
	TAD MCHAR
	JMS PUTO
	JMP I MSET

MKNT,	0
	PAGE
ET,
BLOCK,	0
	TAD I PDHIT
	RTL
	RTL
	RTL
	AND (17
	SNA
	JMP SYS
	DCA SLTM
	STA
	TAD SLTM
	CLL RTR
	RTR
	RAR
	TAD (INPHND
	DCA BLOC
	TAD SLTM
	TAD (15
	JMS OPRINT
	TAD I PDHIT
	SMA CLA
	TAD (40-"+
	TAD ("+
	JMS PUTO	/"+" MEANS 2 PAGE HANDLER
	TAD SLTM
	TAD (SLOTAB-1
	DCA SLTM
	ISZ I SLTM
	JMP I BLOCK
SYS,	JMS PRINT
	TEXT	/SYS/
	DCA BLOC	/0 MEANS RESIDENT WITH SYS:
	JMP I BLOCK

MCHAR,
ENTRY,	0
	JMS PUTSP
	TAD BLOC
	SNA CLA
	JMP SYSENT
	TAD I PDHIT
EN2,	DCA ET
	TAD ET
	RTR
	RTR
	RTR
	AND (1
	SZA
	TAD (20
	TAD (40
	JMS PUTO
	TAD ET
	JMS OPRINT
	JMP I ENTRY

SYSENT,	TAD I PDHRT
	JMP EN2

SLTM,	0
	PAGE
