home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / prog_oth / amigalib.lzh / AMIGALIB / AMIGALIB.LZH / asm_source / WBStat.asm < prev    next >
Encoding:
Assembly Source File  |  1990-01-17  |  1.2 KB  |  39 lines

  1. **********************************************************************
  2. *
  3. *   WBStat version 1.0
  4. *
  5. *   Let a Fortran application determine whether or not it started from
  6. *   WorkBench 
  7. *
  8. *   Author:  Jim Locker, SofTech Inc.  
  9. *
  10. *   This program is placed in the public domain.  Use as you see fit, but
  11. *   the author accepts no liability for anything.
  12. *
  13. *   Usage:
  14. *
  15. *          INTEGER*4 Message
  16. *          Message = WBStat(0)
  17. *
  18. *
  19. *****************************************************************************
  20.  
  21.  
  22. AEXEC   EQU     -16                     * "exec_lib" pointer
  23. DOS     EQU     AEXEC-4                 * "dos.library" pointer
  24. STDIN   EQU     DOS-4                   * file handle for STDIN
  25. STDOUT  EQU     STDIN-4                 * file handle for STDOUT
  26. H.BASE  EQU     STDOUT-4                * base of heap
  27. H.SIZE  EQU     H.BASE-4                * size of heap
  28. WBSTAT  EQU     H.SIZE-2                * running from workbench?
  29. WBMSG   EQU     WBSTAT-4                * loc of WB message
  30. OURTSK  EQU     WBMSG-4                 * loc of our TCB
  31. AMIGA   EQU     -OURTSK                 * size of Amiga global storage
  32.  
  33. * - from "dos.library"
  34.  
  35.  
  36. WBStat:
  37.          move.w WBSTAT(A0),D0
  38.          rts
  39.