................ begin common deck ASMBCOM ........................
.
.
.
.  Define constants for sizes of CYBIL tables - OS tables whose
.       sizes must be known by assembly language modules. Unless
.       otherwise stated, the sizes given here can be larger than
.       the actual size.
.
xcbsize  equ      1048            .Size of XCB.
sdtxsize equ      40              .Size of SDTX entry.
statsize equ      280             .Size of OST$STATUS.
ajllen   equ      100             .Max number of AJL entries - this constant
.                                  is used to set the size of the monitor
.                                  seg tbl. The actual size of the AJL can
.                                  be less than or equal to this value.
jrootsiz   equ      256          .Length of JMT$JOB_CONTROL_BLOCK
.
.
.
.
.   Define monitor constants
.
mstksize  equ      6500          .Length of monitor stack
mstkfram  equ      32            .Length of monitor stack frame
jstksiz1  equ      1024           .Length of job stack for ring 1
jstksiz2  equ      2048          .Length of job stack for ring 2
jstksiz3  equ      512          .Length of job stack for ring 3
jstkfram  equ      32            .Length of job stack frame
jstlen    equ      100           .Number of segments in Job Segtll
mstlen    equ      20            .Number of segments in Monitor Segtll
a170_stl  equ      6             . Number of segments in a170 seg table
.
.
.   Define 'magic' segment numbers. These equates MUST agree with
.   the actual segment numbers assigned during system generation.
.   WARNING: in most cases, no run time checks are made to see if
.   the constants defined here are correct.
.
snptmtr   equ      0             .Page table seg num in monitor.
sneimtr   equ      4             .EI segment number in MTR mode.
sneiemtr  equ      5             .EIE segment number in MTR mode.
snnosmtr  equ      3             .NOS segment number in MTR mode.
.
snjfjob   equ      3             .Job fixed in job mode.
.
.   Define a170 segment numbers for NOS, EI and EIE.
.
snnos170  equ    0           .Nos segment number
snei170   equ    4           .EI segment number
sneie170  equ    5           .EIE segment number
.
.
.   Define operating system constants
.
.
.
m_mtrmsk  equ      x'fffc'       .Monitor mode MM
j_mtrmsk  equ      x'fffc'       .Job mode MM
m_usrmsk  equ      x'ff7f'       .Monitor mode UM
j_usrmsk  equ      x'ff77'       .Job mode UM
m_usrabt  equ      x'edff'       .Fatal UCR conditions, monitor
j_usrabt  equ      x'cc00'       .Fatal UCR conditions, job
m_mcrhlt  equ      x'fb6c'       .MCR conditions that cause halt, monitor.
j_mcrhlt  equ      x'e000'       .MCR conditions that cause halt, job.
m_mcrasy  equ      x'0490'       .MCR conditions that are asynchronous.
j_mcrusr  equ      x'1b0c'       .MCR conditions that are normally
.                                 processed by the job trap handler.
.
.
.   Define offsets for referencing fields in the job table segments
.
jr_mxcb   equ       jrootsiz       .XCB for Job Monitor.
.
          page
.
.
.   Hardware Defined Constants - (it's unlikely that these will
.       ever be changed)
.
sfsa_mcr  equ      48            .Offset to MCR in Stk Frame Save Area
sfsa_ucr  equ      40            .Offset to UCR in Stk Frame Save Area
xpsize    equ      416           .Exchange package size (bytes)
xptp      equ      282           .XP offset to Trap Pointer
xpdlp     equ      290           .XP offset to Debug list pointer.
xpstau    equ      272           .XP offset to seg Table Adr upper
xpstal    equ      280           .XP offset to seg Table Adr lower
xputp     equ      274           .XP offset to UTP
xpflgte   equ      16            .XP offset to FLAGS and TE
xpmcr     equ      48            .XP offset to MCR field
xpucr     equ      40            .XP offset to UCR field
xp170mf   equ      43            .XP offset to byte containing 170 mtr flag
xpvmid    equ      8             .XP offset to VMID field
xpfdesc   equ      16            .XP offset to SFSA frame descriptor.
xpcff     equ      16            .XP offset to CFF flag.
xpstl     equ      128           .XP offset to Seg Table Len
xpum      equ      24            .XP offset to User Mask
xpmm      equ      32            .XP offset to Monitor Mask
xpkm      equ      64            .XP offset to Keypoint Mask
xppit     equ      88            .XP offset to PIT (upper)
xpbc1     equ      104           .XP offset to Base Constant (upper)
xpbc2     equ      112           .XP offset to Base Constant (lower)
xplrn     equ      296           .XP offset to LRN
xpxregs   equ      136          .XP offset to first X register
xptos     equ      298           .XP offset to Top of Stack
m_mcrsit  equ      x'0010'       .MCR masks
m_mcrexs  equ      x'0090'       .EXT INT and SIT
m_mcrhdw  equ      x'a000'       .DUE and SHORT WARNING
m_mcrsrw  equ      x'2000'
m_mcrdue  equ      x'8000'
m_mcrei   equ      x'0080'
m_mcrexc  equ      x'0400'
m_mcrpf   equ      x'0040'
m_mcrmcl  equ      x'0020'
m_mcrsel  equ      x'0002'
m_mcrtrx equ       x'0001'
m_mcrelt equ       x'0003'     .SOFT ERROR LOG and TRAP EXCEPTION.
m_ucrff   equ      x'2000'
m_ucrcff  equ      x'0400'
m_ucrkp   equ      x'0200'
m_ucrdb   equ      x'0080'
r_eid     equ      x'10'         .Element id
r_psm     equ      x'4a'         .Page size mask.
r_te      equ      x'c2'         .Trap enable
r_td      equ      x'c0'         .Trap disabled
r_ted     equ      x'c3'         .Trap enable delay
r_cff_c   equ      x'e0'         .Critical frame flag
r_jps     equ      x'61'         .Job Process State
r_sit     equ      x'62'         .System Interval Timer
r_pit     equ      x'c9'         .Process interval timer.
r_stl     equ      x'45'         .Segment Table Length
r_mcr     equ      x'42'         .Monitor condition register
r_bc      equ      x'47'         .Base constant.
r_um      equ      x'e6'         .User mask.
r_mm      equ      x'60'         .Monitor mask.
r_dlp     equ      x'c5'         .Debug list pointer.
.
.
.
.
.    PROC Definitions for initializing exchange packages
.
          PROC
xpareg    pname
          do  sn:(f:(2,2))=sn:(nil)
            org  f:(2,0)+f:(2,1)*8+10
            vfd,16,32  x'ffff',x'80000000'
          else
            org   f:(2,0)+f:(2,1)*8+10
            address  r,f:(2,2)+f:(2,3)
          dend
          PEND
          PROC
xpa       pname
          do  sn:(f:(2,2))=sn:(nil)
            org  f:(2,0)+f:(2,1)
            vfd,16,32  x'ffff',x'80000000'
          else
            org   f:(2,0)+f:(2,1)
            address  r,f:(2,2)+f:(2,3)
          dend
          PEND
          PROC
xpv       pname
          org   f:(2,0)+f:(2,1)
          vfd,f:(2,3) f:(2,2)
          PEND
.
.   Proc definition for creating equipment table entries
.
          PROC
eqdef     pname
          vfd,16,12,12,12,12  f:(2,0),1,f:(2,1),f:(2,2),f:(2,3)
          PEND
.
.
.
................ end common deck ASMBCOM ..........................
