home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / asmutil / stdlib.zip / CTYPES.ASM < prev    next >
Assembly Source File  |  1990-04-29  |  841b  |  52 lines

  1. stdlib        segment    para public 'slcode'
  2.         assume    cs:stdlib
  3. ;
  4. ; IsAlNum- Checks al to see if it is alphanumeric.
  5. ;
  6.         public    sl_IsAlNum
  7. sl_IsAlNum    proc    far
  8.         cmp    al, '0'
  9.         jb    notan
  10.         cmp    al, '9'
  11.         jbe    isan
  12.         cmp    al, 'A'
  13.         jb    notan
  14.         cmp    al, 'Z'
  15.         jbe     isan
  16.         cmp    al, 'a'
  17.         jb    notan
  18.         cmp    al, 'z'
  19.         jbe    isan
  20. notan:        cmp    al, 'a'            ;Clears zero flag
  21.         ret
  22. isan:        cmp    al, al            ;Sets zero flag
  23.         ret
  24. sl_IsAlNum    endp
  25. ;
  26. ;
  27. ; IsxDigit- Checks al to see if it is a hex digit.
  28. ;
  29.         public    sl_IsxDigit
  30. sl_IsxDigit    proc    far
  31.         cmp    al, '0'
  32.         jb    notah
  33.         cmp    al, '9'
  34.         jbe    isah
  35.         cmp    al, 'A'
  36.         jb    notah
  37.         cmp    al, 'F'
  38.         jbe     isah
  39.         cmp    al, 'a'
  40.         jb    notah
  41.         cmp    al, 'f'
  42.         jbe    isah
  43. notah:        cmp    al, 'a'            ;Clears zero flag
  44.         ret
  45. isah:        cmp    al, al            ;Sets zero flag
  46.         ret
  47. sl_IsxDigit    endp
  48. ;
  49. ;
  50. stdlib        ends
  51.         end
  52.