         DEF      COMBAT:           PATCHING DEF
COMBAT:  RES
*
*
*M*      COMBAT   RBBAT IN-CORE DATA
*
*
*P*      NAME:    COMBAT
*P*
*P*      PURPOSE: IN-CORE DATA FOR RBBAT
*P*
*P*      DESCRIPTION:
*P*               COMBAT CONTAINS THE FOLLOWING DATA NEEDED IN THE
*P*               ROOT FOR RBBAT'S USE:
*P*
*P*               1)  THE RBBAT COMMUNICATION BUFFERS:  THESE 4
*P*                   WORD BUFFERS ARE CHAINED THROUGH THE FIRST
*P*                   BYTE.  THE LINKS ARE DISPLACEMENTS FROM SGCBUF
*P*                   SGCHD IS THE WORD CONTAINING THE HEAD'S OF THE
*P*                   FREE AND IN-USE CHAINS IN THE FOLLOWING FORMAT:
*P*                   -- FREE HEAD,USE TAIL,0,USE HEAD - 8,8,8,8 --
*P*
*P*               2)  THE GETI TABLES:  THESE TABLES WITH ENTRIES
*P*                   FOR INDICES 1,2, AND 3 ARE USED TO HOLD
*P*                   RESOURCE AND SYMBIONT INFORMATION FOR NEW
*P*                   BATCH JOBS BETWEEN THE TIME THEY ARE SCHED-
*P*                   ULED BY MBS AND THE READ OF THE JOB CARD BY CCI
*P*
*P*               3)  RBSWITCH POINTERS:  THESE THREE WORDS ARE THE
*P*                   ADDRESSES OF THE START AND END OF THE RBSWITCH
*P*                   ROUTINE WHEN IT IS IN CORE, AND ITS USE COUNT
*P*
*P*               4)  S:SBGC:  THE GRAN COUNT SCHEDULING FLAG
*P*
*P*               5)  S:RBBRN:  THE RBBATR SYMBIONT ALLOC. BLOCK
*P*
*P*               6)  S:SIBTU:  THE XEROX 1200 BUFFERING CONTROL
*P*
*P*      REFERENCE:
*P*               THE GETI TABLES AND THE RBBAT COMBUFS ARE
*P*               BOTH DISCUSSED IN THE DATA BASE TECH MANUAL.
*P*               THE GETI TABLES ARE USED BY MBS AND ADD (GETI)
*P*               AND THE RBBAT COMBUFS BY RBBAT AND SGCQ (IN THE
*P*               MODULE COOP)
*
*
         DEF      NOPGFC            RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    RELEASE BUFFER ONLY
         DEF      AIF               RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    ADD JOB INPUT FILE FROM DEVICE
         DEF      AIFJE             RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    ADD JOB INPUT FILE FROM JOBENT
         DEF      AIFNC             RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    ADD NON-CONTROL INPUT FILE
         DEF      AOFL              RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    ADD BATCH OUTPUT FILE (LAST FOR JOB)
         DEF      AOF               RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    ADD BATCH OUTPUT FILE (NOT LAST)
         DEF      AOFNB             RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    ADD NON-BATCH OUTPUT FILE
         DEF      AOFP              RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    ADD PARTIAL OUTPUT FILE
         DEF      GOF               RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    GET OUTPUT FILE
         DEF      GIFNC             RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    GET NON-CONTROL INPUT FILE
         DEF      MBSGFC            RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    MULTI-BATCH SCHEDULE
         DEF      PRIOGFC           RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    PRIO KEYIN
         DEF      KDELGFC           RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    DELETE KEYIN
         DEF      KFRMGFC           RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    SYYNDD,F TYPE FORM KEYIN
         DEF      KDISPGFC          RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    DISPLAY KEYINS
         DEF      JESTAT            RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    JOBENT STATUS REQUEST
         DEF      JEDEL             RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    JOBENT CANCEL REQUEST
         DEF      SWITGFC           RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    RBSWITCH KEYIN
         DEF      KCOMGFC           RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    RBCOM KEYIN
         DEF      SNDGFC            RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    RBSEND KEYIN
         DEF      BCSTGFC           RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    RBBDCST KEYIN
         DEF      DUP               RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    REMOTE TERMINAL CONNECTED
         DEF      LORR              RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    REMOTE TERMINAL'S LOGON RECORD RECIEVED
         DEF      HUP               RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    REMOTE TERMINAL DISCONNECTED
         DEF      OCMGFC            RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    IRBT OC MESSAGE
         DEF      RCVRGFC           RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    PERFORM RBBAT RECOVERY
         DEF      RCVRGFC1          RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    MARKS POINT OF RCVR IN :RBLOG COMBUFS
         DEF      KFCGFC            RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    FORM (SYSID) TYPE FORM KEYIN
         DEF      KOSTOP            RBBAT GHOST FUNCTION CODE (GFC)
*,*   SEE D. B. TECH MANUAL   --    OUTPUT STOP KEYIN.
         DEF      RBBSPCL           RBBAT GFC FOR RBBAT SPECIAL
*,*                                 FUNCTIONS (RBBAT MAGIC).
         DEF      DMPSFC            SUBCODE ON RBBSPCL FOR DUMP MAGIC
         DEF      RSTSFC            SUBCODE ON RBBSPCL FOR RESET MAGIC
         DEF      KFLUSH            RBBAT GFC FOR FLUSH KEYIN.
         DEF      S:SIBTU           XEROX 1200 BUFFERING CONTROL WORD
         DEF      S:RBBRN           WHEN ZERO SYMB GRANS ARE NOT
*,*                                 ALLOCATED - RBBAT RECOVERY IN PROG.
         DEF      S:SBGC            WHEN NOT ZERO OUTPUT SYMBIONT FILES
*,*                                 ARE ASSIGNED PRIORITIES BY #GRANS
*,*                                 TIMES # OF COPIES
         DEF      SWTINIT           ADDRESS OF RBSWITCH PROCESSORS
*,*                                 INITIALIZATION ROUTINE WHEN IT
*,*                                 IS IN CORE
         DEF      SWTUC             USE COUNT OF RBSWITCH PROCESSOR
         DEF      SWTEND            ADDRESS OF RBSWITCH PROCESSOR'S
*,*                                 END ROUTINE WHEN IT IS IN CORE
         DEF      SGCHD             CONTAINS HEADS AND TAILS OF RBBAT
*,*                                 COMBUF CHAINS HEAD-OF-FREE,TAIL-OF
*,*                                 USE,ZERO,HEAD-OF-USE -- 8,8,8,8
         DEF      SGCBUF            BASE ADDRESS OF RBBAT COMBUFS
         DEF      SGCBUFSZ          SIZE OF RBBAT COMBUF AREA
         DEF      GI:FRE            GETI TABLE - SEE D.B. TECH MANUAL
*,*                                 CHAIN OF FREE GETI ENTRIES
         DEF      GI:SDA            GETI TABLE - SEE D.B. TECH MANUAL
*,*                                 0,RERUN,0,JOBENT,STARTING D.A. 5,1,1,1,24
         DEF      GI:ASPN           GETI TABLE - SEE D.B. TECH MANUAL
*,*                                 DEVICE ALLOCATION FLAGS (3 WORDS)
         DEF      GI:RES            GETI TABLE - SEE D.B. TECH MANUAL
*,*                                 RESOURCES FROM !LIMIT (4 WORDS)
         DEF      GIH:TIM           GETI TABLE - SEE D.B. TECH MANUAL
*,*                                 TIME FROM !LIMIT
         DEF      GIB:UN            GETI TABLE - SEE D.B. TECH MANUAL
*,*                                 USER NUMBER
         DEF      GIB:PRT           GETI TABLE - SEE D.B. TECH MANUAL
*,*                                 PARTITION
         DEF      GIB:RID           GETI TABLE - SEE D.B. TECH MANUAL
*,*                                 RBID OF SUBMITTING STATION
         DEF      GIB:XLN           GETI TABLE - SEE D.B. TECH MANUAL
*,*                                 EXCLUSIVE SERIAL NUMBER HEAD FOR LSERIAL
         DEF      GIB:SLN           GETI TABLE - SEE D.B. TECH MANUAL
*,*                                 SHARED SERIAL NUMBER HEAD FOR LSERIAL
         DEF      GIB:PRI           GETI TABLE - SEE D.B. TECH MANUAL
*,*                                 PRIORITY AT WHICH THE JOB WAS RUN
         DEF      S:DSPKEY          * MAGIC RBBAT ON:LINE DISPLAY
*,*                                 * KEY CELL(0 SAYS NO DICE)
         DEF      S:SPILLKEY        * MAGIC SPILL/FILL KEY CELL
*,*                                 * 0 SAYS NO DICE ON THIS SYSTEM.
         DEF      S:SGCSAV          SAVE OF FREE AND IN USE CHAIN
*,*                                 HEADS BY RBBAT
         DEF      S:QUIET           FLAG TO INDICATE TIE-UP OF COMM
*,*                                 BUFFS BY RBBAT
*
*
*                                   GHOST FUNCTION CODES FOR:
NOPGFC   EQU      0
AIF      EQU      1
AIFJE    EQU      2
AIFNC    EQU      3
AOFL     EQU      4
AOF      EQU      5
AOFNB    EQU      6
AOFP     EQU      7
GOF      EQU      8
GIFNC    EQU      9
MBSGFC   EQU      10
PRIOGFC  EQU      11
KDELGFC  EQU      12
KFRMGFC  EQU      13
KDISPGFC EQU      14
JESTAT   EQU      15
JEDEL    EQU      16
SWITGFC  EQU      17
KCOMGFC  EQU      18
SNDGFC   EQU      19
BCSTGFC  EQU      20
DUP      EQU      21
LORR     EQU      22
HUP      EQU      23
OCMGFC   EQU      24
RCVRGFC  EQU      25
RCVRGFC1 EQU      26
KFCGFC   EQU      27
KOSTOP   EQU      28
RBBSPCL  EQU      29
DMPSFC   EQU      1                 DUMP SUBCODE
RSTSFC   EQU      2                 RESET SUBCODE
KFLUSH   EQU      30
*
*
S:SIBTU  DATA     9                 FOR OCP
*                                   :
S:RBBRN  DATA     0                 0 => DONT ALLOC SYMB GRNS
*
S:SBGC   DATA     0                 0 => DONT SCHED BY GRN CNT
*
S:DSPKEY DATA     0                 0 => ONLINE BATCH QUE DISP
*                                    IS DISALLOWED, ELSE THE MAGIC FORM
*                                   NAME WHICH RETRIEVES THE DISPLAY.
S:SPILLKEY DATA   0                 0=> SPILL FILL IS NOT ALLOWED ON
*                                   THIS SYSTEM, ELSE THE MAGIC KEY WHICH
*                                   ALLOWS ACCESS TO IT.
*
SWTINIT  DATA     0
SWTUC    DATA     0
SWTEND   DATA     0
*                                   THE GETI TABLES - TRANSFER OF INPUT FILES
S:SGCSAV DATA     0                 SAVE OF HEADS OF FREE AND IN USE
*                                   CHAINS OF COM BUFFS IN QUIET MODE
S:QUIET  DATA     0                 FLAG TO INDICATE QUIET MODE
*                                    ( NO COMM BUFFS AVAILABLE )
*                                   FROM RBBAT TO THE COOP
GI:FRE   EQU      %                 FREE ENTRY CHAIN
         DATA     X'00010203'       :
GI:SDA   EQU      %-1               STARTING DISC ADDRESS
         DATA     0,0,0             :
GI:RES   EQU      %-4
         DO       3
         DATA     0,0,0,0
         FIN
GI:ASPN  EQU      %-3
         DO       3
         DATA     0,0,0
         FIN
GIH:TIM  EQU      %                 TIME:
         DATA     0,0               :
GIB:PRT  EQU      %                 PARTITION NUMBER
         DATA     0                 :
GIB:RID  EQU      %                 RBID
         DATA     0                 :
GIB:UN   EQU      %                 USER NUMBER
         DATA     0                 :
GIB:SLN  EQU      %                 SHARED SN HEAD IN LSERIAL
         DATA     0                 :
GIB:XLN  EQU      %                 EXCLUSIVE SN HEAD IN LSERIAL
         DATA     0                 :
GIB:PRI  EQU      %                 PRIORITY
         DATA     0                 :
*                                   :
*                                   GHOST COMMUNICATION BUFFERS
#SGCBF   EQU      15                # OF SGC BUFFERS
SGCSZ    EQU      4                 WORDS PER BUFFER
*
*                                   :
SGCHD    EQU      %                 SGCHD IS A WORD OF :
SGCBUF   EQU      %                 :
         GEN,8,8,8,8 1,0,(#SGCBF-1)*SGCSZ+1,0
*********************************************
* HEAD OF  : TAIL OF  : TAIL OF  : HEAD OF  *
*  FREE    :  IN USE  :  FREE    :  IN USE  *
*  CHAIN   :  CHAIN   :  CHAIN   :  CHAIN   *
*********************************************
K        SET      SGCSZ+1
         DO       #SGCBF-1          BUFFERS ARE SGCSZ WORDS EACH LINKED
         GEN,8,24 K,0               THROUGH THE FIRST BYTE WITH THE
         DO1      SGCSZ-1           DISPLACEMENT OF THE NEXT BUFFER
         DATA     0                 FROM SGCBUF
K        SET      K+SGCSZ
         FIN
         DO1      SGCSZ
         DATA     0
SGCBUFSZ EQU      %-SGCBUF
         END

