home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / proglc / tnylib.lzh / ISDIGIT.ASM < prev    next >
Encoding:
Assembly Source File  |  1986-08-30  |  287 b   |  25 lines

  1. include compiler.inc
  2.     ttl    ISDIGIT, 1.03, 08-03-86 clr
  3.  
  4. ;char function - ret 1 if 0-9, else 0
  5.  
  6.     dseg
  7.  
  8.     cseg
  9.  
  10.     procdef    isdigit, <<chr, byte>>
  11.  
  12.     mov    al,chr
  13.     mov    dx,0
  14.     cmp    al,'0'    ;30h
  15.     jb    ex
  16.     cmp    al,'9'    ;39h
  17.     ja    ex
  18.     inc    dx
  19. ex:    mov    ax,dx
  20.     pret
  21.  
  22.     pend    isdigit
  23.  
  24.     finish
  25.