################################################################################ # U P P E R _ C A S E # # ---------------------------- # # Subroutine to convert all lowercase characters in the passed Character # # variable to uppercase. # #------------------------------------------------------------------------------# # Calling format # # ============== # # CALL UPPER_CASE (string1) # # # # Argument # # ======== # # string1 # # [INOUT] A CHARACTER variable whose lowercase characters are to be # # converted to uppercase. # #------------------------------------------------------------------------------# # Interface # # ========= # # SUBROUTINE UPPER_CASE (STRING1) # # CHARACTER(*),INTENT(INOUT) :: STRING1 # # END SUBROUTINE UPPER_CASE # #------------------------------------------------------------------------------# # Library File: SYS$LIBRARY:INTOOLSLIB.OLB # #------------------------------------------------------------------------------# # *********************************************************************** # # * LIMITED RIGHTS * # # * * # # * This software is supplied without representation of warranty of * # # * any kind. The author therefore assumes no responsibility and * # # * shall have no liability of any kind arising from the supply or * # # * use of this software. * # # * * # # * This software may be used only by the purchaser. This software * # # * or any other copies thereof may not be provided or otherwise made * # # * available to any other person. No title to and ownership of the * # # * software is hereby transferred. * # # * * # # * The information in this software is subject to change without * # # * notice and should not be construed as a commitment by the author. * # # * * # # * The information contained herein is proprietary to the author and * # # * its use, disclosure, or duplication is restricted. * # # *********************************************************************** # #------------------------------------------------------------------------------# # D a t e A u t h o r Description of Modification # # ----------- ----------- --------------------------- # # 27-JUL-1993 K.Woolridge Original. # ################################################################################ .NOLIST .INCLUDE "C:\\SOURCE\\ASM\\INCLUDE\\ALPHABET_CHARS.INC" .LIST #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .GLOBAL UPPER_CASE UPPER_CASE: MOV %EAX,4(%ESP) # Get String address MOV %EBX,8(%ESP) # Get String Length MOV %EDX,%EBX # Save length MOV %ECX,0 UC_01: # Do MOV %BL,(%EAX) # Next character CMP %BL,PC_LO_A # Compare to "a" JL UC_02 # Less than, don't change CMP %BL,PC_LO_Z # Compare to "z" JG UC_02 # Greater than, don't change SUB %BL,0X20 # Convert to upper case MOV (%EAX),%BL # Save converted character UC_02: ADD %EAX,1 # Increment pointer ADD %ECX,1 # Increment counter CMP %ECX,%EDX # Finished? JGE RETURN # Yes, exit JMP UC_01 # End do RETURN: RET