home *** CD-ROM | disk | FTP | other *** search
- **********************************************************************
- *
- * WBStat version 1.0
- *
- * Let a Fortran application determine whether or not it started from
- * WorkBench
- *
- * Author: Jim Locker, SofTech Inc.
- *
- * This program is placed in the public domain. Use as you see fit, but
- * the author accepts no liability for anything.
- *
- * Usage:
- *
- * INTEGER*4 Message
- * Message = WBStat(0)
- *
- *
- *****************************************************************************
-
-
- AEXEC EQU -16 * "exec_lib" pointer
- DOS EQU AEXEC-4 * "dos.library" pointer
- STDIN EQU DOS-4 * file handle for STDIN
- STDOUT EQU STDIN-4 * file handle for STDOUT
- H.BASE EQU STDOUT-4 * base of heap
- H.SIZE EQU H.BASE-4 * size of heap
- WBSTAT EQU H.SIZE-2 * running from workbench?
- WBMSG EQU WBSTAT-4 * loc of WB message
- OURTSK EQU WBMSG-4 * loc of our TCB
- AMIGA EQU -OURTSK * size of Amiga global storage
-
- * - from "dos.library"
-
-
- WBStat:
- move.w WBSTAT(A0),D0
- rts
-