.TITLE $CVTUC - CONVERT TO UPPER CASE .IDENT "V1.0" .NLIST BEX,ME,CND .ENABL LC .SBTTL Author's Credits ;+1 ; Author: Henry R. Tumblin ; ; Date: 21-Jan-79 ; For: Systems/Utilities ; Module Name; $CVTUC - Convert string to upper case ; Machine/System: PDP-11/70 IAS V2.0 ; Type/Language: Subroutine/MACRO(Assembler) ; Residence: DB1:[1,20]CVTUC.MAC,OBJ is in SYSLIB ; Size: @32. bytes ; Abstract: This module will convert the input string to ; upper case as described in the RSX-11/IAS ; System Library routines manual. Unfortunately, ; it was missing from our distribution kit, so ; I had to break down and write it myself. ;+3 ; Edits: ; Date By Reason ; --------- ----- ---------------------------------------------------- ; None ;-3 ;-1 .sbttl Technical description ;+5 ; This routine will convert the input string ; to upper case. This will only work on any ; characters in the 141-172(8) range. ; ; Inputs are : ; ; R0 - The address of the text string to be converted ; R1 - The address of the output area for the upper ; case string. ; R2 - The number of bytes in the string to be converted. ; Outputs are : ; ; R0-R1 are preserved. ; R2 - destroyed. ; R3-R5 - Not used. ;-5 .sbttl Mainline code .GLOBL $CVTUC $CVTUC: MOV R0,-(SP) ; Preserve R0 MOV R1,-(SP) ; and R1 10$: MOVB (R0)+,(R1) ; Move into position CMPB #140,(R1) ; Is it lower case BHIS 20$ ; HIS - nope CMPB #173,(R1) ; Check high range BLOS 20$ ; LOS - nope BICB #40,(R1) ; Else convert to upper case 20$: INC R1 ; Update pointer SOB R2,10$ ; Loop till thru. MOV (SP)+,R1 ; Restore registers MOV (SP)+,R0 ; .... RETURN ; And return to whom spawned us. .END