	.title	rmser1	1st ovrelay for rms11 error text

	.psect


	.macro	save	list
	.if b , <list>
	.ift
	 save	<r0,r1,r2,r3,r4,r5>
	.iff
	.irp	x,<list>
	 mov	x,-(sp)
		.endr
	.endc
	.endm	save


	.macro	unsave	list
	.if b , <list>
	.ift
	unsave	<r5,r4,r3,r2,r1,r0>
	.iff
	.irp	x,<list>
	 mov	(sp)+,x
		.endr
	.endc
	.endm	unsave


rmser1::save	<r0,r1,r2>		; be nice to our caller
	mov	4(r5)	,r1		; return buffer address
	mov	r1	,r2		; save buffer address
	clrb	(r1)+			; make first char .asciz
	mov	#77	,r0		; clear it out first
10$:	movb	#40	,(r1)+		; fill rest of buffer with spaces
	sob	r0	,10$		; next please
	mov	#dsp	,r0		; get the index table for errors
20$:	tst	@r0			; hit the end yet ?
	beq	100$			; yes, exit with no text
	cmp	@2(r5)	,@r0		; type indexentry = record
	beq	30$			;       errnum: integer
	cmp	(r0)+	,(r0)+		;	errtxt: textaddress
	br	20$			;      end ;

30$:	mov	2(r0)	,r0		; get the error text address
	call	rmserx

100$:	unsave	<r2,r1,r0>		; pop our registers and exit
	return

	.globl	rmserx




	.psect	msgtxt	,ro,d,lcl,rel,con
	.psect	dsp	,ro,d,lcl,rel,con
dsp:
	.macro	$ioer$	nam,code,txt

	.psect	msgtxt
	$$ 	= .
	$$x 	= 0
	.irpc	$$c,<nam>
	$$x =	$$x + 1
	.iif ge	,$$x-4, .byte ''$$c
	.endr
	.asciz	#txt#
	.psect	dsp
	.word	code,$$
	nam	=	code
	.psect
	.endm




$IOER$	ER$ABO,-16.,<THIS ERROR CODE NO LONGER IN USE>
$IOER$	ER$ACC,-32.,<F11ACP ACCESS ERROR>
$IOER$	ER$ACT,-48.,<CURRENT RMS ACTIVITY PRECLUDES OPERATION>
$IOER$	ER$AID,-64.,<BAD AREA ID(STV=@XAB)>
$IOER$	ER$ALN,-80.,<ALIGNMENT OPTIONS ERROR(STV=@XAB)>
$IOER$	ER$ALQ,-96.,<IMPROPER ALLOCATION QUANTITY>
$IOER$	ER$ANI,-112.,<NOT ANSI "D" FORMAT>
$IOER$	ER$AOP,-128.,<ALLOCATION OPTIONS ERROR(STV=@XAB)>
$IOER$	ER$AST,-144.,<INVALID OPERATION AT AST LEVEL>
$IOER$	ER$ATR,-160.,<ATTRIBUTE READ ERROR>
$IOER$	ER$ATW,-176.,<ATTRIBUTE WRITE ERROR>
$IOER$	ER$BKS,-192.,<BUCKET SIZE TOO LARGE(FAB)>
$IOER$	ER$BKZ,-208.,<BUCKET SIZE TOO LARGE(STV=@XAB)>
$IOER$	ER$BLN,-224.,<THIS ERROR CODE NO LONGER IN USE>
$IOER$	ER$BOF,-232.,<BEGINNING OF FILE DETECTED($SPACE)>
$IOER$	ER$BPA,-240.,<PRIVATE POOL ADDRESS ZERO OR NOT WORD-ALIGNED>
$IOER$	ER$BPS,-256.,<PRIVATE POOL SIZE NOT MULTIPLE OF "4">
$IOER$	ER$BUG,-272.,<INTERNAL RMS ERROR CONDITION DETECTED>
$IOER$	ER$CCR,-288.,<CAN'T CONNECT RAB>
$IOER$	ER$CHG,-304.,<$UPDATE-KEY CHANGE WITHOUT HAVING ATTRIBUTE OF XB$CHG SET>
$IOER$	ER$CHK,-320.,<BUCKET HEADER CORRUPTED>
$IOER$	ER$CLS,-336.,<RSTS/E CLOSE FUNCTION FAILED(STV=SYS ERR CODE)>
$IOER$	ER$COD,-352.,<INVALID OR UNSUPPORTED "COD" FIELD(STV=@XAB)>
$IOER$	ER$CPB,-360.,<PARAMETER BLOCK HAS INVALID ARGUMENT LIST>
$IOER$	ER$CRE,-368.,<COULD NOT CREATE FILE(STV=SYS ERR CODE)>
$IOER$	ER$CUR,-384.,<NO CURRENT RECORD>
$IOER$	ER$DAC,-400.,<F11ACP DEACCESS ERROR DURING CLOSE>
$IOER$	ER$DAN,-416.,<DATA AREA NUMBER INVALID(STV=@XAB)>
$IOER$	ER$DEL,-432.,<RFA-ACCESSED RECORD WAS DELETED>
$IOER$	ER$DEV,-448.,<BAD DEVICE, OR INAPPROPRIATE DEVICE TYPE>
$IOER$	ER$DFW,-456.,<ERROR OCCURRED ON DEFERRED WRITE>
$IOER$	ER$DIR,-464.,<ERROR IN DIRECTORY NAME>
$IOER$	ER$DME,-480.,<DYNAMIC MEMORY EXHAUSTED>
$IOER$	ER$DNA,-488.,<ZERO DNA WITH NON-ZERO DNS>
$IOER$	ER$DNF,-496.,<DIRECTORY NOT FOUND>
$IOER$	ER$DNR,-512.,<DEVICE NOT READY>
$IOER$	ER$DPE,-520.,<DEVICE POSITIONING ERROR>
$IOER$	ER$DTP,-528.,<"DTP" FIELD INVALID(STV=@XAB)>
$IOER$	ER$DUP,-544.,<DUPLICATE KEY DETECTED>
$IOER$	ER$ENT,-560.,<RSX-F11ACP ENTER FUNCTION FAILED>
$IOER$	ER$ENV,-576.,<OPERATION NOT SELECTED IN ORG$ OR TKB>
$IOER$	ER$EOF,-592.,<END-OF-FILE>
$IOER$	ER$ESA,-600.,<EXPANDED STRING ADDRESS IS ZERO>
$IOER$	ER$ESL,-604.,<NO EXPANDED STRING IN EXPANDED STRING AREA>
$IOER$	ER$ESS,-608.,<EXPANDED STRING AREA TOO SHORT>
$IOER$	ER$EXP,-616.,<FILE EXPIRATION DATE NOT YET REACHED>

	.psect	dsp
	.word	0,0			; mark end of text

	.end
