.TITLE ASKCUC ; ; .IDENT /Y07.00/ ; ; ; .ENABL LC ; ; ; Copyright (C) Shell Research Ltd. 1982 ; ; ; The copyright in this computer program and associated user ; instructions contained in this document is the property of ; Shell Research Ltd.. No guarantee is given or may be implied ; as to the adequacy of the program or its suitability for any ; particular purpose and no liability is accepted for any loss ; or damage arising out of its use. ; ; ; ; Version: Y07 ; ; ; Original author: R J Carpenter 11-Oct-82 ; ; ; This version: R.J. Carpenter 29-Feb-84 ; ; .PAGE .SBTTL Description ; ; ;++ ; This subroutine converts lower to upper case characters in an ASCII ; string. ;-- ; .page .sbttl ASKCUC -- Code ; ; .psect $ask$ ; ASKCUC:: mov #qlin,r0 ;set up string addr. mov ipoint,r1 ;set up string length ble 99$ ;br if length -ve or zero ; 10$: cmpb (r0),#141 ; < 'a' ? blt 20$ ;br if yes cmpb (r0),#172 ; > 'z' ? bgt 20$ ;br if yes bicb #40,(r0) ;convert to upper case 20$: inc r0 ;point at next output byte dec r1 ;decr. loop counter bne 10$ ;br if not zero ; 99$: return ; ; .END