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

  1.     page    66,132
  2. ;******************************** MKEY18.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. IS_TEXT - check if key returned by KEY_READ is 20H-7EH or tab
  15. ;
  16. ; inputs:    AX = keycode returned by KEY_READ or AH=0, AL=ascii
  17. ; output:    if CF = 0, keycode is text
  18. ;            if CF = 1, keycode is not text
  19. ;* * * * * * * * * * * * * *
  20. 
  21.     PUBLIC    IS_TEXT
  22. IS_TEXT        PROC    FAR
  23.     or    ah,ah
  24.     jnz    ia_not        ;jmp if not TEXT
  25.     cmp    al,9        ;check if tab
  26.     je    ia_yes        ;jmp if tab
  27.     cmp    al,' '
  28.     jb    ia_not        ;jmp if not text
  29.     cmp    al,7eh
  30.     ja    ia_not        ;jmp if not TEXT
  31. ia_yes:    clc
  32.     jmp    ia_exit
  33. ia_not:    stc
  34. ia_exit:retf    
  35. IS_TEXT ENDP
  36.  
  37. LIBSEG    ENDS
  38.     end
  39.