home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / CTASK22.ZIP / TSKNDP.ASM < prev    next >
Assembly Source File  |  1990-10-12  |  1KB  |  64 lines

  1. ;
  2. ;    --- Version 2.2 90-10-12 10:38 ---
  3. ;
  4. ;    CTask - 80x87 Numeric Data Processor support
  5. ;
  6. ;    Public Domain Software written by
  7. ;        Thomas Wagner
  8. ;        Ferrari electronic Gmbh
  9. ;        Beusselstrasse 27
  10. ;        D-1000 Berlin 21
  11. ;        Germany
  12. ;
  13. ;    This file is new with version 2.1.
  14. ;
  15. ;    It contains support routines for the 80x87 NDP.
  16. ;    It will assemble to nothing if the NDP configuration flag
  17. ;    is FALSE.
  18. ;
  19.     name    tskndp
  20. ;
  21.     include    tsk.mac
  22. ;
  23.     IF    NDP
  24.     .tsk_model
  25. ;
  26.     Pubfunc    tsk_check_ndp
  27. ;
  28.     .tsk_code
  29. ;
  30. ;    tsk_check_ndp    Check for presence of NDP.
  31. ;
  32. ;    Returns 1 if NDP is present, 0 if not.
  33. ;
  34. ;    NOTE: Only the Equipment byte returned by INT 11 is checked. 
  35. ;    No real check for the presence of an 80x87 is done.
  36. ;    An actual check would be safer, but there seem to be a number
  37. ;    of machines where executing NDP-instructions without an NDP
  38. ;    installed will hang the machine. To avoid this, we rely on
  39. ;    the equip byte actually reflecting the true configuration.
  40. ;    Since most other programs using the NDP will do the same
  41. ;    (including Turbo C, and possibly MS C, too), there seems to
  42. ;    be not much gain in more thorough checks. If you disagree,
  43. ;    and can supply "safe" checks for an NDP, please send me
  44. ;    your modifications.
  45. ;
  46. Localfunc tsk_check_ndp
  47. ;
  48.     int    11h            ; equipment
  49.     and    ax,2
  50.     jz    no_ndp
  51.     mov    ax,1
  52.     ret
  53. ;
  54. no_ndp:
  55.     xor    ax,ax
  56.     ret
  57. ;
  58. tsk_check_ndp    endp
  59. ;
  60.     .tsk_ecode
  61.     ENDIF
  62.     end
  63.  
  64.