home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / clipper / gt_windm.asm < prev    next >
Assembly Source File  |  1993-10-14  |  1KB  |  61 lines

  1. ;  File......: GT_WINDM.ASM
  2. ;  Author....: Lee Rothman
  3. ;  BBS.......: The Dark Knight Returns
  4. ;  Net/Node..: 050/069
  5. ;  User Name.: Lee Rothman
  6. ;  Date......: 15/04/93
  7. ;  Revision..: 1.0
  8. ;
  9. ;  This is an original work by Lee Rothman and is placed in the public
  10. ;  domain.
  11. ;
  12. ;  Modification history:
  13. ;  ---------------------
  14. ;
  15. ;  $Log$
  16. ;
  17. ;
  18. ;
  19. ;   $DOC$
  20. ;   $FUNCNAME$
  21. ;       GT_WINDMODE()
  22. ;   $CATEGORY$
  23. ;       Environment
  24. ;   $ONELINER$
  25. ;       Check if application is running in a windows dos box.
  26. ;   $SYNTAX$
  27. ;       GT_WindMode() --> nWindMode
  28. ;   $ARGUMENTS$
  29. ;       None
  30. ;   $RETURNS$
  31. ;       A Numeric value. (0, 2 or 3)
  32. ;   $DESCRIPTION$
  33. ;       GT_WindMode() can be used to see if your application is running
  34. ;       under MS Windows 3.1 and in what mode.
  35. ;   $EXAMPLES$
  36. ;       nWindMode := GT_WindMode
  37. ;       DO CASE nWindMode
  38. ;          CASE nWindMode == 0
  39. ;               ? "Not running in a Windows DOS box"
  40. ;          CASE nWindMode == 2
  41. ;               ? "Running in a Windows DOS box (Standard mode)
  42. ;          CASE nWindMode == 3
  43. ;               ? "Running in a Windows DOS box (Enhanced mode)
  44. ;       ENDCASE
  45. ;   $END$
  46. ;
  47.  
  48. include  extenda.inc
  49. codeseg
  50. CLpublic <GT_WindMode>
  51. CLfunc   int GT_WindMode
  52. Clcode
  53.          mov ax, 160ah
  54.          int 2fh
  55.          cmp ax,0
  56.          jz In_Win
  57.          mov cx,0
  58.      In_Win:
  59. CLret    cx
  60. end
  61.