home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / ASM / ALIB30B / MKEY05.ASM < prev    next >
Assembly Source File  |  1994-10-15  |  854b  |  36 lines

  1.     page    66,132
  2. ;******************************** MKEY05.ASM *********************************
  3.  
  4. LIBSEG           segment byte public "LIB"
  5.         assume cs:LIBSEG , ds:nothing
  6.  
  7. ;----------------------------------------------------------------------------
  8. .xlist
  9.     include  mac.inc
  10.     include  common.inc
  11. .list
  12. comment 
  13. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(MOUSE/KEY)
  14. TO_UPPER - converts ascii character to upper case
  15. ;
  16. ; inputs:    AX = keycode returned by KEY_READ or AH=0, AL=ascii
  17. ; output:    AL = upper case ascii
  18. ;* * * * * * * * * * * * * *
  19. 
  20.     PUBLIC    TO_UPPER
  21. TO_UPPER        PROC    FAR
  22.     OR      AH,AH
  23.     JNZ     tou_exit
  24.     CMP     AL,61h    ; 'a'
  25.     JB      tou_exit
  26.     CMP     AL,7Ah    ; 'z'
  27.     JA      tou_exit
  28.     AND     AL,0DFh
  29. tou_exit:
  30.     RETF
  31. TO_UPPER ENDP
  32.  
  33. LIBSEG    ENDS
  34.     end
  35.