
        INCLUDE "exec/exec.i"
        INCLUDE "exec/exec_lib.i"
        INCLUDE "rexx/storage.i"
        INCLUDE "rexx/rxslib.i"
        INCLUDE "arp/arpbase.i"

        MACRO   LONGBITS
        ifge    \2-24
                \1      #\2-24,\3
        MEXIT
        ENDC
        ifge    \2-16
                \1      #\2-16,1+\3
        MEXIT
        ENDC
        ifge    \2-8
                \1      #\2-8,2+\3
        MEXIT
        ENDC
                \1      #\2,3+\3
        ENDM


        MACRO   WORDBITS
        ifge    \2-8
                \1      #\2-8,\3
        MEXIT
        ENDC
                \1      #\2,1+\3
        ENDM

        MACRO   INITRT
        \1.RL:  REG     \2
ARGSTART SET    \3
        movem.l \2,-(sp)
        ENDM

        MACRO ENDRT
        movem.l (sp)+,\1.RL
        rts
        ENDM

RDEMAXOUT EQU 16

;The RHB_ bits are for RHFlags.

;This bit is set before disprxmsg() calls do_command. Thus you can trap
;attempts to execute privilaged commands.
RHB_ACTIVE      EQU     0

;Set this bit to indicate a halt condition.
RHB_HALTED      EQU     1

;Set this bit when the user locks the host. Reset it when unlocking
RHB_USRLOCK     EQU     4

;Set this bit when a macro issues a LOCK command. Reset on UNLOCK or on
;users' clrrhlocks.
RHB_MCRLOCK     EQU     5

;Set this bit if you don't want ARexx macros using you console window,
;or if you are not connected toa console window.
RHB_NOIO        EQU     8


;sendrxmsg() will set this bit in ChkPorts after munging the RHPort->SigBit.
CPB_RHPORT      EQU     1


;The following relate to the act argument ot sendrxmsg().

; Set this bit if sendrxmsg() can return after sending the message; i.e.
;without waiting for a reply.
SRMB_ASYNCH     EQU     16

;Set this bit to make the initial host address = 'REXX'. This must be done
;for both `string files' [to avoid horrendous errors]
;and implied macros [to avoid vicious circles].
SRMB_HOSTNM     EQU     17

;Set this bit to send the message to 'AREXX', rather than to 'REXX'.
;Doing this (with ARexx v1.10 and beyond) means that the message will
;return without waiting for the completion of the macro.
;NOTE: THIS IS NOT A SUBSTITUTE FOR ASYNCHRONOUS PROCESSING. It is a sop
;to all the hosts that don't have it in the first place. Not for those
;who want to do things the `right' way.
SRMB_TONAME     EQU     18


