*SOURCE CODE FOR LOAD OR SAVE CHARACTER SETS - DAN PINAL
* CIO CALL TO SAVE OR LOAD CHRS
* IOCB, MUST BE OPPENED
CIO
	PLA			; GET # ARGS OFF STACK
	PLA			; HIBYTE OF IOCB TO USE
	PLA			; IOCB
	ASL
	ASL
	ASL
	ASL			; X16
	TAX
	PLA			; BUFFER HI
	STA	$345,X
	PLA			; BUFFER LO
	STA	$344,X
	PLA			; LENGTH HI
	STA	$349,X
	PLA			; LENGTH LO
	STA	$348,X
	PLA			; Q$ HI
	STA	$D5
	PLA			; Q$ LO
	STA	$D4
	LDY	#$00
	LDA	($D4),Y
	LDY	#$07		; FOR LOAD
	CMP	#'S		; SAVE/LOAD?
	BNE	.1
	LDY	#$0B		; THEN SAVE
.1	TYA
	STA	$342,X		; COMMAND
	JMP	$E456		; CIOV
