home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 411b.lha / dme_1.42 / src.LZH / src / rexx / rxslib.i < prev    next >
Text File  |  1988-07-31  |  8KB  |  214 lines

  1. * === rexx/rxslib.i ====================================================
  2. *
  3. * Copyright (c) 1986, 1987 by William S. Hawes (All Rights Reserved)
  4. *
  5. * ======================================================================
  6. * Include file for the REXX Systems Library
  7.  
  8.          IFND     REXX_RXSLIB_I
  9. REXX_RXSLIB_I  SET   1
  10.  
  11.          IFND     REXX_STORAGE_I
  12.          INCLUDE  "rexx/storage.i"
  13.          ENDC
  14.  
  15.          ; Macro definitions 
  16.  
  17. RXSNAME  MACRO
  18.          dc.b     'rexxsyslib.library',0
  19.          ENDM
  20.  
  21. RXSID    MACRO
  22.          dc.b     'rexxsyslib 1.02 (01 NOV 87)',10,0
  23.          ENDM
  24.  
  25. RXSDIR   MACRO                         ; directory (device) for programs
  26.          dc.b     'REXX',0
  27.          ENDM
  28.  
  29. RXSTNAME MACRO                         ; name for tasks
  30.          dc.b     'ARexx',0
  31.          ENDM
  32.  
  33. * Macro to call a library function (assumes library pointer is in A6)
  34. CALLSYS  MACRO    * FunctionName
  35.          CALLLIB  _LVO\1
  36.          ENDM
  37.  
  38. * Macro to define an external library entry point (offset)
  39. XLIB     MACRO    * FunctionName
  40.          XREF     _LVO\1
  41.          ENDM
  42.  
  43. * Structure definition for the REXX systems library
  44.          STRUCTURE RxsLib,LIB_SIZE     ; EXEC library node
  45.          UBYTE    rl_Flags             ; global flags
  46.          UBYTE    rl_pad
  47.          APTR     rl_SysBase           ; EXEC library base
  48.          APTR     rl_DOSBase           ; DOS library base
  49.          APTR     rl_IeeeDPBase        ; IEEE DP math library base
  50.          LONG     rl_SegList           ; library seglist
  51.          LONG     rl_MaxAlloc          ; maximum memory allocation
  52.          LONG     rl_Chunk             ; allocation quantum
  53.          LONG     rl_MaxNest           ; maximum expression nesting
  54.          APTR     rl_NULL              ; static string: NULL
  55.          APTR     rl_FALSE             ; static string: FALSE
  56.          APTR     rl_TRUE              ; static string: TRUE
  57.          APTR     rl_REXX              ; static string: REXX
  58.          APTR     rl_COMMAND           ; static string: COMMAND
  59.          APTR     rl_STDIN             ; static string: STDIN
  60.          APTR     rl_STDOUT            ; static string: STDOUT
  61.          APTR     rl_STDERR            ; static string: STDERR
  62.          APTR     rl_Version           ; version string
  63.  
  64.          LONG     rl_TaskName          ; name string for tasks
  65.          LONG     rl_TaskPri           ; starting priority
  66.          LONG     rl_TaskSeg           ; startup seglist
  67.          LONG     rl_StackSize         ; stack size
  68.          APTR     rl_RexxDir           ; REXX directory
  69.          APTR     rl_CTABLE            ; character attribute table
  70.          APTR     rl_Notice            ; copyright notice
  71.  
  72.          STRUCT   rl_RexxPort,MP_SIZE  ; public port
  73.          UWORD    rl_ReadLock          ; lock count
  74.          APTR     rl_TraceFH           ; global trace console
  75.          STRUCT   rl_TaskList,LH_SIZE  ; REXX task list
  76.          WORD     rl_NumTask
  77.          STRUCT   rl_LibList,LH_SIZE   ; Library List header
  78.          WORD     rl_NumLib
  79.          STRUCT   rl_ClipList,LH_SIZE  ; ClipList header
  80.          WORD     rl_NumClip
  81.          STRUCT   rl_MsgList,LH_SIZE   ; pending messages
  82.          WORD     rl_NumMsg
  83.          LABEL    rl_SIZEOF
  84.  
  85. * Global flag bit definitions for RexxMaster
  86. RLFB_TRACE  EQU   RTFB_TRACE           ; interactive tracing?
  87. RLFB_HALT   EQU   RTFB_HALT            ; halt execution?
  88. RLFB_SUSP   EQU   RTFB_SUSP            ; suspend execution?
  89. RLFB_TCUSE  EQU   RTFB_TCUSE           ; trace console in use?
  90. RLFB_TCOPN  EQU   4                    ; trace console open?
  91. RLFB_STOP   EQU   6                    ; deny further invocations
  92. RLFB_CLOSE  EQU   7                    ; close the master
  93.  
  94. RLFMASK     EQU      $07               ; passed flags
  95.  
  96.          ; Initialization constants
  97.  
  98. RXSVERS  EQU      2                    ; main version
  99. RXSREV   EQU      1                    ; revision
  100. RXSALLOC EQU      $800000              ; maximum allocation
  101. RXSCHUNK EQU      1024                 ; allocation quantum
  102. RXSNEST  EQU      32                   ; expression nesting limit
  103. RXSTPRI  EQU      0                    ; task priority
  104. RXSSTACK EQU      4096                 ; stack size
  105. RXSLISTH EQU      4                    ; number of list headers
  106.  
  107. * The library entry point offsets
  108.          LIBINIT
  109.          LIBDEF   _LVORexx             ; Main entry point
  110.          LIBDEF   _LVOrxParse          ; (private)
  111.          LIBDEF   _LVOrxInstruct       ; (private)
  112.          LIBDEF   _LVOrxSuspend        ; (private)
  113.          LIBDEF   _LVOEvalOp           ; (private)
  114.  
  115.          LIBDEF   _LVOAssignValue      ; (private)
  116.          LIBDEF   _LVOEnterSymbol      ; (private)
  117.          LIBDEF   _LVOFetchValue       ; (private)
  118.          LIBDEF   _LVOLookUpValue      ; (private)
  119.          LIBDEF   _LVOSetValue         ; (private)
  120.          LIBDEF   _LVOSymExpand        ; (private)
  121.  
  122.          LIBDEF   _LVOErrorMsg
  123.          LIBDEF   _LVOIsSymbol
  124.          LIBDEF   _LVOCurrentEnv
  125.          LIBDEF   _LVOGetSpace
  126.          LIBDEF   _LVOFreeSpace
  127.  
  128.          LIBDEF   _LVOCreateArgstring
  129.          LIBDEF   _LVODeleteArgstring
  130.          LIBDEF   _LVOLengthArgstring
  131.          LIBDEF   _LVOCreateRexxMsg
  132.          LIBDEF   _LVODeleteRexxMsg
  133.          LIBDEF   _LVOClearRexxMsg
  134.          LIBDEF   _LVOFillRexxMsg
  135.          LIBDEF   _LVOIsRexxMsg
  136.  
  137.          LIBDEF   _LVOAddRsrcNode
  138.          LIBDEF   _LVOFindRsrcNode
  139.          LIBDEF   _LVORemRsrcList
  140.          LIBDEF   _LVORemRsrcNode
  141.          LIBDEF   _LVOOpenPublicPort
  142.          LIBDEF   _LVOClosePublicPort
  143.          LIBDEF   _LVOListNames
  144.  
  145.          LIBDEF   _LVOClearMem
  146.          LIBDEF   _LVOInitList
  147.          LIBDEF   _LVOInitPort
  148.          LIBDEF   _LVOFreePort
  149.  
  150.          LIBDEF   _LVOCmpString
  151.          LIBDEF   _LVOStcToken
  152.          LIBDEF   _LVOStrcmpN
  153.          LIBDEF   _LVOStrcmpU
  154.          LIBDEF   _LVOStrcpyA
  155.          LIBDEF   _LVOStrcpyN
  156.          LIBDEF   _LVOStrcpyU
  157.          LIBDEF   _LVOStrflipN
  158.          LIBDEF   _LVOStrlen
  159.          LIBDEF   _LVOToUpper
  160.  
  161.          LIBDEF   _LVOCVa2i
  162.          LIBDEF   _LVOCVi2a
  163.          LIBDEF   _LVOCVi2arg
  164.          LIBDEF   _LVOCVi2az
  165.          LIBDEF   _LVOCVc2x
  166.          LIBDEF   _LVOCVx2c
  167.  
  168.          LIBDEF   _LVOOpenF
  169.          LIBDEF   _LVOCloseF
  170.          LIBDEF   _LVOReadStr
  171.          LIBDEF   _LVOReadF
  172.          LIBDEF   _LVOWriteF
  173.          LIBDEF   _LVOSeekF
  174.          LIBDEF   _LVOQueueF
  175.          LIBDEF   _LVOStackF
  176.          LIBDEF   _LVOExistF
  177.  
  178.          LIBDEF   _LVODOSCommand
  179.          LIBDEF   _LVODOSRead
  180.          LIBDEF   _LVODOSWrite
  181.          LIBDEF   _LVOCreateDOSPkt
  182.          LIBDEF   _LVODeleteDOSPkt
  183.          LIBDEF   _LVOSendDOSPkt
  184.          LIBDEF   _LVOWaitDOSPkt
  185.          LIBDEF   _LVOFindDevice
  186.  
  187.          LIBDEF   _LVOAddClipNode
  188.          LIBDEF   _LVORemClipNode
  189.          LIBDEF   _LVOLockRexxBase
  190.          LIBDEF   _LVOUnlockRexxBase
  191.  
  192. * Character attribute flag bits used in REXX.  Attributes are defined only
  193. * for ASCII characters (range 0-127).
  194. CTB_SPACE   EQU   0                    ; white space characters
  195. CTB_DIGIT   EQU   1                    ; decimal digits 0-9
  196. CTB_ALPHA   EQU   2                    ; alphabetic characters
  197. CTB_REXXSYM EQU   3                    ; REXX symbol characters
  198. CTB_REXXOPR EQU   4                    ; REXX operator characters
  199. CTB_REXXSPC EQU   5                    ; REXX special symbols
  200. CTB_UPPER   EQU   6                    ; UPPERCASE alphabetic
  201. CTB_LOWER   EQU   7                    ; lowercase alphabetic
  202.  
  203. * Attribute flags
  204. CTF_SPACE   EQU   1<<CTB_SPACE
  205. CTF_DIGIT   EQU   1<<CTB_DIGIT
  206. CTF_ALPHA   EQU   1<<CTB_ALPHA
  207. CTF_REXXSYM EQU   1<<CTB_REXXSYM
  208. CTF_REXXOPR EQU   1<<CTB_REXXOPR
  209. CTF_REXXSPC EQU   1<<CTB_REXXSPC
  210. CTF_UPPER   EQU   1<<CTB_UPPER
  211. CTF_LOWER   EQU   1<<CTB_LOWER
  212.  
  213.          ENDC
  214.