.title cupper ; ; this routine implements the following fortran interface ; ; c = cupper(x) ; ; where c and x are both logical*1 variables ; ; if x is in the range a-z, the upper case equivalent is returned. If not ; the character is returned ; ap=%5 x=2 BIGA=101 BIGZ=132 LETA=141 LETZ=172 DIF=LETA-BIGA MASK=177 .psect $r.roi,con,ro,rel,lcl,i .enabl lsb cupper:: movb @x(ap),r0 ; place character in r0 cmpb r0,#LETA&MASK ; see if >= a blt 10$ ; if <, then return cmpb r0,#LETZ&MASK ; see if <= z bgt 10$ ; if >, then return sub #DIF,r0 ; subtract 40(8) from character 10$: return .end