;
; ***************************************************************
;
			.TITLE UPPLOW
			.PSECT UPPLOW,SHR,NOWRT
;	this is a subroutine to upper case or lower case some text
;
; ****************************************************************
;
;
;
; table to convert lower case letters to upper case
;
UPPER_TABLE:
	.ASCII /.........	/	;hex 00-09
	.BYTE ^X0A,^X0B,^X0C,^X0D,^X0E,^X0F	;hex 0a-0f
	.ASCII /.............../	;hex 10-1f
	.ASCII A !"#$%&'()*+,-./A	;hex 20-2f
	.ASCII /0123456789:;<=>?/	;hex 30-3f
	.ASCII /@ABCDEFGHIJKLMNO/	;hex 40-4f
	.ASCII /PQRSTUVWXYZ[\]^_/	;hex 50-5f
	.ASCII /`ABCDEFGHIJKLMNO/	;hex 60-6f
	.ASCII /PQRSTUVWXYZ{|}~./	;hex 70-7f
;
; table to convert upper case letters to lower case
;
LOWER_TABLE:
	.ASCII /.........	/	;hex 00-09
	.BYTE ^X0A,^X0B,^X0C,^X0D,^X0E,^X0F	;hex 0a-0f
	.ASCII /.............../	;hex 10-1f
	.ASCII A !"#$%&'()*+,-./A	;hex 20-2f
	.ASCII /0123456789:;<=>?/	;hex 30-3f
	.ASCII /@abcdefghijklmno/	;hex 40-4f
	.ASCII /pqrstuvwxyz[\]^_/	;hex 50-5f
	.ASCII /`abcdefghijklmno/	;hex 60-6f
	.ASCII /pqrstuvwxyz{|}~./	;hex 70-7f
;
; there are two routines upper and lower
; they do the obvious things
; they both take two arguments -- 
;	the first argument is the address of the text
;	the second argument is the size of the text
;
UPPER::
	.WORD	^M<R0,R1,R2,R3,R4,R5>
	MOVL	4(AP),R0			;address of text
	MOVL	8(AP),R1			;size of text
	MOVTC	R1,(R0),#^A/./,UPPER_TABLE,R1,(R0)
	RET
LOWER::
	.WORD	^M<R0,R1,R2,R3,R4,R5>
	MOVL	4(AP),R0			;address of text
	MOVL	8(AP),R1			;size of text
	MOVTC	R1,(R0),#^A/./,LOWER_TABLE,R1,(R0)
	RET
.END
