SYM$CORE_TRAP_HANDLER  IDENT
.
.         ojc      1
*copyc MTA$SMU_COMMUNICATION_BLOCK
*copy SYA$CONSTANTS
*copy OSA$BASIC_REGISTER_EQUATES
*copyc SYA$DCTL_ASSEMBLY_CONSTANTS
*copyc OSI$XCB_FOR_CURRENT_TASK
*copyc OSC$XCB_ASEMBLY_CONSTANTS
*copyc OSA$KEYPOINT_CLASSES
*copyc sya$xp_and_sf_constants
.
.
.  local definitions
.
x_enviro   equ      0154(16)        .Descriptor for CALLS.
x_envirod  equ      0156(16)        .Descriptor for call to debug.
.
x_ucr      xreg     3               .UCR from trapped SFSA.
x_jobff   xreg     4                       .Flag to indicate if Job trap handler
                                           .  nedds a FREE FLAG trap.
x_di      xreg     5                       .Debug index.
x_dmr     xreg     6                       .Debug mask register.
a_mflag   areg     4                       .BS entry for processing flags.
a_xcb     areg     5                       .Pointer to XCB.

. Stack frame offsets

plist     equ      8                       .Stack - start of param list
cond_opts equ      64                      .Stack - ring crossing condition options
enable    equ      72                      .Stack - flag for trap enable at exit (boolean)
user_regs  equ     80                      .Stack - Area for saving user registers
.
.  The following constant value must have the same value as mmc$ring_crossing_offset.
.
rc_offset equ      28(16)                  .Ring crossing frame offset.
.
          page
.
.  Trap handler for NOS/VE System Core
.
          use      code
          def      traprtn
traprtn   alias    SYP$SYSTEM_CORE_TRAP_HANDLER
traprtn   bss      0
.
          addaq    a0,a1,120               .Push stack frame.  Must be 78(16) bytes
                                           .so that A0 remains at a 0 MOD 80 address
                                           .for THETA_E.  108(16) bytes are already
                                           .in the save area.
          entp     x1,1
          sbyts,1  x1,a1,x0,enable         .Default to enable traps at exit

          lbyts,2  x_ucr,a2,x0,xpucr       .Get the UCR from the SFSA.
          lbyts,2  x1,a2,x0,xpum           .Mask with current UM.
          andx     x_ucr,x1
          shfx     x1,x_ucr,x0,13
          keypoint oscent,x1,osktrpj
          laxcbp   a_xcb,x1                .Get pointer to XCB.
.
.  Check for system core debug active. System core debug is called if:
.      . a 'debug' trap occurred AND the debug list is in ring 1
.                OR
.      . the trapped P ring number was less than 'high_ring_for_debug AND
.           either an MCR fault or UCR fault (except CFF, PIT, KEYPOINT, FF, DEBUG)
.           occurred
.
          la       ae,a3,bs_dbctl          .Fetch pointer to debug control table.
          shfx     x1,x_ucr,x0,24          .Check for debug trap -
          brrge    x1,x0,ckdb5             .  jump if not a debug trap.
          entl     x0,r_dlp                .Check for Ring 1 DLP.
          cpysx    x1,x0
          shfx     x1,x1,x0,-44
          decx     x1,1                    .X1=0 implies system debug trap
          brxeq    x1,x0,ckdb8
ckdb5     lbyts,1  x1,ae,x0,dbring         .Test for trap < high ring.
          cpyax    x2,a2
          shfx     x2,x2,x0,-44
          brxgt    x2,x1,ckpit             .Jump if > high ring.
          ente     x1,0c97f(16)
          andx     x1,x_ucr
          brxeq    x1,x0,ckpit             .Jump if not ia selected UCR fault.
ckdb8     la       ae,ae,dbproc            .Fetch pointer to debug procedure.
          entl     x0,r_di                 .Save debug index and mask regs.
          cpysx    x_di,x0
          entl     x0,r_dmr
          cpysx    x_dmr,x0
          ente     x0,x_envirod
          callseg  0,ae,a0
          entl     x0,r_di                 .Restore debug index and mask reg.
          cpyxs    x_di,x0
          entl     x0,r_dmr
          cpyxs    x_dmr,x0
          brxne    x1,x0,ckpit             .Clear UCR.DEBUG if trap caused by system debug
          ente     x1,m_ucrdb
          inhx     x_ucr,x1
          sbyts,2  x_ucr,a2,x0,xpucr
.
.  Process PIT trap.
.
ckpit     bss      0
          shfx     x1,x_ucr,x0,19          .Move 'pit' to bit 32.
          brrge    x1,x0,ckmf              .Branch if no PIT.
          la       af,a3,bs_dfpit          .Get default PIT value.
          lx       x1,af,0
          sx       x1,a1,0                 .Set up parameter list
          addaq    af,a1,2*8
          sa       af,a1,1*8
          ente     x0,x_enviro
          cpyaa    af,a1                   .parameter list address.
          callseg  bs_spit,a3,af           .Update PIT
.
.  Process Monitor Flags if either 1) the trap occurred in ring 1 and ring
.  1 flags are set, or 2) the trap occurred above ring 1.
.  The register 'X_JOBFF' is set non-zero if job free flag trap is pending.
.
ckmf      lbyts,mfbc x_jobff,a_xcb,x0,xcbmflag .Get monitor flags.
          brreq    x_jobff,x0,ckmore       .Jump if no flags set.
          brseg    x1,a2,a0,ckmf2          .Jump if above ring 1.
          ente     x1,mfring1              .Mask for ring 1 flags.
          andx     x_jobff,x1
          brxeq    x_jobff,x0,ckmore       .Jump if no ring 1 flags set.
ckmf2     shfx     x1,x_jobff,x0,32-8*mfbc+1 .Move flag 1 to bit 32.
          shfx     x_jobff,x_jobff,x0,1-8*mfbc .Isolate bit 0.
          cpyaa    a_mflag,a3              .Pointer to handler.
          entp     x2,1                    .Flag number.
ckmf5     brrge    x1,x0,ckmf9             .Jump if flag not set.
          cpyxx    x0,x2                   .Clear flag in XCB.
          sbit     x1,a_xcb,xcbmflag,x0    .  (X1, bit 0 is always zero)
          ente     x0,x_enviro             .Call the handler.

. Monitor flag handlers have an optional parameter:
.                   VAR boolean
. They should set it FALSE if traps should NOT be enabled when the
. current invocation of the trap handler exits. Default is to enable traps.

          addaq    ae,a1,enable            .Set up parameter list
          sa       ae,a1,plist
          addaq    ae,a1,plist
          callseg  bs_mfhan,a_mflag,ae
ckmf9     addaq    a_mflag,a_mflag,16      .Increment binding sec addr.
          incx     x2,1                    .Increment flag number.
          shfx     x1,x1,x0,1              .Next flag to bit 32.
          brrne    x1,x0,ckmf5             .Jump if more flags.
          lbyts,mfbc x2,a_xcb,x0,xcbmflag  .Get monitor flags.
          shfx     x_jobff,x2,x0,1-8*mfbc  .Isolate bit 0.
                                           .  If the free flag was set it still is.
          isob     x2,x2,x0,6116(8)        .Ignore Free flag.
          brseg    x1,a2,a0,ckmf10         .Jump if above ring 1.
          ente     x1,mfring1              .Mask for ring 1 flags.
          andx     x2,x1
ckmf10    brxne    x2,x0,ckmf              .Check for more to do
          insb     x_ucr,x_jobff,x0,6200(8)  .set ucr ff if more processing to do
.
.
.  Exit if no UCR bits except KEYPOINT are set.
.  NOTE: PIT was formerly eliminated from the UCR along with KEYPOINT.
.
ckmore    brxne    x_ucr,x0,prtrap         .Jump if other UCR bits are set.
.
exit      bss      0
          keypoint oscexit,x0,osktrpj
          lbyts,1  x1,a1,x0,enable
          brreq    x0,x1,exit1             .If not to enable traps
          entl     x0,r_ted                .Set trap-enable-delay.
          cpyxs    x0,x0                   . and return.
.
. The following field definition is used to support the PSFSA instruction which is
. required for CYBER-2000 but is not available in the ASSEMBLER language yet.
. When it is available, replace the VFD line with the following line:
.exit1    psfsa                             .Purge the SFSA pushdown (CYBER-2000 only)
.
exit1    bss     0
         vfd,16   0701(16)                 .Purge the SFSA pushdown (CYBER-2000 only)
         return
.
.
.  A trap occurred that needs more processing, (ie, not KEYPOINT).
.  Processing depends on whether we are executing in ring 1 or
.  above ring 1.
.
prtrap    brseg    x1,a2,a0,jobtrap        .Jump if A2 points to a ring different from
.                                          .  this proc, (above ring 1).
          la       ae,a2,26                .Get A2 from SFSA.
          brseg    x1,a2,ae,prtrap1        .Jump if ring crossing found.
          brxeq    x0,x0,rng1trap
prtrap1   lbyts,6  xb,a2,x0,18             .Get stack frame CSF.
          isob     x7,xb,x0,7007(8)        .Isolate last 8 bits of offset.
          brxeq    x7,x0,exit              .If a ring crossing frame.
          page
.
.
.  Trap handler for faults that occur while executing in ring 1.
.
rng1trap  ente     x1,0c97f(16)            .Call system error if any fatal
          andx     x1,x_ucr                .  occurred in ring 1.
          brxeq    x1,x0,ckfreflg          .Jump if no fatal error.
          sx       x_ucr,a1,plist
          ente     x0,x_enviro
          addaq    ae,a1,plist
          callseg  bs_scuh,a3,ae

.
.  Process FREE FLAG trap and/or PIT trap.
.
ckfreflg  lbyts,mfbc x9,a_xcb,x0,xcbmflag  .Get monitor flags.
          brxeq    x9,x0,ckpit1            .If no free flag needed.
          entp     x9,2                    .Select FREE FLAG option.
ckpit1    shfx     x1,x_ucr,x0,19          .Move 'pit' to bit 32.
          brrge    x1,x0,ckfre0            .Jump if no PIT.
          incx     x9,1                    .Select PIT option.
ckfre0    brxeq    x9,x0,ckdebug           .Jump if no options selected.
ckfre1    cpyaa    af,a2                   .Find the ring crossing stack frame.
ckfre5    la       ae,af,26                .  Get A2 from SFSA.
          brseg    x1,af,ae,ckfre8         .  Jump if ring crossing found.
          cpyaa    af,ae
          brxeq    x0,x0,ckfre5
.
.  Put a SFSA at the bottom of the stack in front of the ring crossing
.  frame. Make it look like the ring crossing processor called the owner
.  of the ring crossing frame.  When the ring crossing processor executes
.  it will cause Free Flag processing to occur in the next higher ring.
.
ckfre8    bss      0
          lbyts,6  xb,af,x0,18             .Get first stack frame CSF.
          isob     x7,xb,x0,7007(8)        .Isolate last 8 bits of offset.
          brxne    x7,x0,ckfre85           .If not a ring crossing frame.
          lbyts,1  x1,af,x0,32             .Get condition options from SFSA.
          iorx     x9,x1                   .Insert new options.
          cpyaa    aa,af
          brxeq    x0,x0,ckfre9

ckfre85   lx       xa,a3,bs_raprc          .Get ring alarm proc P.
          isob     xa,xa,x0,2057(8)        .Isolate P register PVA.
          lbyts,2  xd,af,x0,0              .Get GLOBAL and LOCAL KEYS.
          insb     xa,xd,x0,0017(8)        .Insert GLOBAL and LOCAL KEYS in P.
          cpyax    xe,a3                   .Binding section address to A3.
          lbyts,6  xd,af,x0,26             .Set A2 to PSA.
          addxq    xb,xb,-rc_offset        .New SFSA A0
          cpyxa    aa,xb
          sa       aa,af,26                .New PSA for ring crossing frame.
          cpyxx    xc,xb                   .Set A1 to same as A0.
          ente     x1,00130(16)            .Insert a frame descriptor.
          insb     xc,x1,x0,0017(8)
          entl     x0,r_um                 .Read the UM and
          cpysx    x1,x0                   .  insert in SFSA.
          insb     xd,x1,x0,0017(8)
          ente     x1,01a0e(16)            .Descriptor for SMULT of x10 - x14.
          smult    x1,aa,0                 .Store new SFSA.
.
. The following field definition is used to support the PSFSA instruction which is
. required for CYBER-2000 but is not available in the ASSEMBLER language yet.
. When it is available, replace the VFD line with the following line:
.         psfsa                            .Purge the SFSA pushdown (CYBER-2000 only)
.
          vfd,16   0701(16)                .Purge SFSA pushdown (CYBER-2000 only)
ckfre9    sbyts,1  x9,aa,x0,32             .Save condition options in SFSA.
          ente     x0,x_enviro
          callseg  bs_scch,a3,a0
.
.  Process debug trap that occurred in ring 1.
.
ckdebug   shfx     x1,x_ucr,x0,24          .Move 'debug' to bit 32.
          brrge    x1,x0,ckcff             .Jump if no debug trap.
          entp     x0,8                    .Set up X0 for clearing bit 8 of UM.
          cpyaa    af,a2                   .Set AF to point to PSA.
ckdeb5    sbit     x0,af,xpum,x0           .Clear 'debug' in UM.
          la       af,af,26                .Set AF to point to PSA.
          brseg    x1,af,a0,ckcff          .Exit loop when not R1 SFSA.
          brxeq    x0,x0,ckdeb5
.
.  Check for CFF trap.
.
ckcff     shfx     x1,x_ucr,x0,21          .Move 'cff' to bit 32.
          brrge    x1,x0,ckend             .Jump if no CFF.
          pop                              .POP the current SFSA.
          entl     x0,r_cff_c              .Clear CFF in live register.
          cpyxs    x0,x0
ckcff4    entl     x0,r_ted                .Set TRAP-ENABLE-DELAY.
          cpyxs    x0,x0
          brxeq    x_jobff,x0,ckcff5       .Set FF if job trap handler
          brcr     2,5,ckcff5              .  needs calling.
ckcff5    entl     x0,0ff(16)              .Descriptor for all A and X.
          lmult    x0,a0,-47*8             .This reloads all A and X registers.
                                           .Must compensate for PUSH of 120 bytes!
.
. The following field definition is used to support the PSFSA instruction which is
. required for CYBER-2000 but is not available in the ASSEMBLER language yet.
. When it is available, replace the VFD line with the following line:
.         psfsa                            .Purge the SFSA pushdown (CYBER-2000 only)
.
          vfd,16   0701(16)                .Purge SFSA pushdown (CYBER-2000 only)
          return
.
.  End of trap handling for traps that occur in ring 1.
.
ckend     lbyts,1  x1,a1,x0,enable
          brreq    x0,x1,ckend1            .If not to enable traps
          entl     x0,r_ted                .Set TRAP-ENABLE-DELAY and return.
          cpyxs    x0,x0
ckend1    return
          page
.
.
.
.  Trap handler for traps that occur from above Ring 1.
.
.
jobtrap   bss      0
.
.  Update the UCR in the SFSA since not all conditions need to
.  be processed by the job trap handler.
.
          insb     x_ucr,x_jobff,x0,6200(8)  .Set the FF bit if needed.
jobt99    brxeq    x_ucr,x0,exit           .Exit if UCR is null.
          sbyts,2  x_ucr,a2,x0,xpucr       .Update job SFSA.UCR.
.
.  Clear Monitor flag 0 if processing a Free Flag trap.
.
          brxeq    x_jobff,x0,jobt1        .Jump if no FF trap.
          entp     x0,0                    .Clear bit 0.
          sbit     x0,a_xcb,xcbmflag,x0
.
.  Push a SFSA to the top of the stack for the ring in which the trap
.  occurred. Make it look like the job trap handler called the system
.  core trap handler. * * note this requires that the job trap handler
.  be in a run-anywhere segment.
.  NOTE: The value of the vector simulation flag is passed in XE.
.
jobt1     la       af,a3,bs_jobth          .Set AF to point to ^job trap handler.
          la       af,af,0
          lbyts,6  xa,af,x0,2              .Fetch P.
          lbyts,6  xe,af,x0,10             .Fetch binding section address.
          lbyts,2  xd,a2,x0,0              .Get GLOBAL and LOCAL KEYS from PSA.P
          insb     xa,xd,x0,0017(8)        .Insert GLOBAL and LOCAL KEYS in P
          cpyax    xd,a2                   .Set A2 to PSA.
          addaq    a2,a2,33*8              .Increment A2 by size of SFSA.
          cpyax    xb,a2                   .Set A0 to top of user stack.
          cpyxx    xc,xb                   .Set A1 to same as A0.
          isob     x1,xd,x0,2003(8)        .Isolate user ring number.
          insb     xa,x1,x0,2003(8)        .Insert ring to P
          insb     xe,x1,x0,2003(8)        .Insert ring to A3.
          ente     x1,00130(16)            .Insert a frame descriptor.
          insb     xc,x1,x0,0017(8)
          entl     x0,r_um                 .Read the UM and
          cpysx    x1,x0                   .  insert in SFSA.
          insb     xd,x1,x0,0017(8)
          ente     x1,01a0e(16)            .Descriptor for SMULT of x10 - x14.
          smult    x1,a2,0                 .Store new SFSA.
.
. The following field definition is used to support the PSFSA instruction which is
. required for CYBER-2000 but is not available in the ASSEMBLER language yet.
. When it is available, replace the VFD line with the following line:
.         psfsa                            .Purge the SFSA pushdown (CYBER-2000 only)
.
          vfd,16   0701(16)                .Purge SFSA pushdown (CYBER-2000 only)
          la       af,a3,bs_scb            .Pass VECTOR SIMULATION flag in XE
          lbyts,3  xe,af,x0,scbvecsim
.
          return                           .Return to Job Trap Handler.
.
.
.
          page
.
.  SET JOB_FREE_FLAG IN MONITOR FLAGS
.
          defg     freeflg
freeflg   alias    SYP$ENABLE_JOB_FREE_FLAG
          align    0,8
freeflg   bss      0
.
          laxcbp   a_xcb,x1                .get pointer to xcb.
          entl     x0,0
          entp     x1,1
          sbit     x1,a_xcb,xcbmflag,x0     .set free flag
          return
.
.
.
          page
.
.  RING 1 RING CROSSING PROCESSOR
.
          def      raproc
          align    0,8
raproc    bss      0
          entl     x0,r_td                 .Disable traps.
          cpyxs    x0,x0
          addaq    a0,a1,344               .Push room for registers.
          ente     x0,40ff(16)             .Descriptor for user registers.
          smult    x0,a1,user_regs         .Save user registers.
.
. The following field definition is used to support the PSFSA instruction which is
. required for CYBER-2000 but is not available in the ASSEMBLER language yet.
. When it is available, replace the VFD line with the following line:
.         psfsa                            .Purge the SFSA pushdown (CYBER-2000 only)
.
          vfd,16   0701(16)                .Purge SFSA pushdown (CYBER-2000 only)
          lbyts,1  x0,a1,x0,32             .Get condition options.
          sbyts,1  x0,a1,x0,cond_opts      .Save in stack.
.
.  Process Monitor Flags if any ring 1 flags set.
.  The register 'X_JOBFF' is set non-zero if job free flag trap is pending.
.
          laxcbp   a_xcb,x1                .get pointer to xcb.
raprc1    lbyts,mfbc x_jobff,a_xcb,x0,xcbmflag .Get monitor flags.
          brreq    x_jobff,x0,raprce       .Jump if no flags set.
raprc2    shfx     x1,x_jobff,x0,32-8*mfbc+1 .Move flag 1 to bit 32.
          shfx     x_jobff,x_jobff,x0,1-8*mfbc .Isolate bit 0.
          cpyaa    a_mflag,a3              .Pointer to handler.
          entp     x2,1                    .Flag number.
raprc3    brrge    x1,x0,raprc4            .Jump if flag not set.
          cpyxx    x0,x2                   .Clear flag in XCB.
          sbit     x1,a_xcb,xcbmflag,x0    .  (X1, bit 0 is always zero)
.
.  Set up to call a monitor flag handler.
.
          ente     x0,x_enviro             .Call the handler.
          addaq    ae,a1,enable            .Set up parameter list
          sa       ae,a1,plist
          addaq    ae,a1,plist
          callseg  bs_mfhan,a_mflag,ae
raprc4    addaq    a_mflag,a_mflag,16      .Increment binding sec addr.
          incx     x2,1                    .Increment flag number.
          shfx     x1,x1,x0,1              .Next flag to bit 32.
          brrne    x1,x0,raprc3            .Jump if more flags.
          lbyts,mfbc x1,a_xcb,x0,xcbmflag  .Get monitor flags.
          shfx     x_jobff,x1,x0,1-8*mfbc  .Isolate bit 0.
                                           .  If the free flag was set it still is.
          isob     x9,x1,x0,6116(8)        .Ignore Free flag.
          insb     x1,x_jobff,x0,7600(8)   .Save condition of FREE FLAG.
          lbyts,1  x0,a1,x0,cond_opts      .Get condition options.
          iorx     x0,x1                   .Insert FREE FLAG if there.
          sbyts,1  x0,a1,x0,cond_opts      .Put back in stack.
          brxne    x9,x0,raprc1            .Check for more to do
raprce    cpyaa    a0,a1                   .POP the space we pushed
.
.  Call the procedure rtproc so that the
.  proper value for TOS is preserved.
.
          ente     x0,00130(16)
          callseg  bs_rtprc,a3,a0          Callee does not return to caller.

.
.
.
          def      rtproc
          align    0,8
rtproc    bss      0
          la       a9,a2,18                .Callers CSF
          lbyts,1  x_ucr,a9,x0,cond_opts   .Get condition options.
          la       a2,a2,26                .Use callers PSA.  This POPs caller.
          lbyts,2  x9,a2,x0,16             .Get SFSA descriptor.
          ente     x0,0fff(16)             .Mask for register options.
          andx     x9,x0
          entx     x1,0ff(16)
          brxne    x9,x1,rtproc1           .If not a full frame.
          lbyts,2  x9,a2,x0,xpucr          .Get the UCR from the SFSA.
          lbyts,2  x1,a2,x0,xpum           .Mask with current UM.
          andx     x9,x1
          shfr     x_ucr,x_ucr,x0,12       .Position to UCR bit positions.
          iorx     x_ucr,x9                .Combine with SFSA UCR.
          isob     x_jobff,x_ucr,x0,6200(8)  .Preserve FF bit condition.
          laxcbp   a_xcb,x1                .get pointer to xcb.
          brxeq    x0,x0,jobt99            .Go invoke job trap handler.
.
. Set up to return directly to user.
.
rtproc1   entl     x0,r_ted                .Set trap_enable_delay.
          cpyxs    x0,x0
          shfr     x_ucr,x_ucr,x0,30       .Position FREE FLAG option bit.
          brrge    x_ucr,x0,rtproc2        .If not FREE FLAG option.
          brcr     2,5,rtproc2             .Set Free Flag.
rtproc2   shfr     x_ucr,x_ucr,x0,1        .position PIT option bit.
          brrge    x_ucr,x0,rtproc3        .If not PIT option.
          brcr     3,5,rtproc3             .Set PIT.
rtproc3   ente     x0,40ff(16)             .Descriptor for reload of registers.
          lmult    x0,a9,user_regs         .Reload user registers.
.
. The following field definition is used to support the PSFSA instruction which is
. required for CYBER-2000 but is not available in the ASSEMBLER language yet.
. When it is available, replace the VFD line with the following line:
.         psfsa                            .Purge the SFSA pushdown (CYBER-2000 only)
.
          vfd,16   0701(16)                .Purge SFSA pushdown (CYBER-2000 only)
          return
.
.
.
          page
.
.  Define Binding Section for System Core Trap Handler.
.
          use      binding
          ref      scch
scch      alias    SYP$INVOKE_SYSCORE_COND_HANDLER
bs_scch   address  c,scch
.
          ref      scuh
scuh      alias    SYP$INVOKE_SYSCORE_UCR_HANDLER
bs_scuh   address  c,scuh
.
          ref      dfpit
dfpit     alias    OSV$DEFAULT_PIT
bs_dfpit  address  p,dfpit
.
          ref      dbctl
dbctl     ALIAS    SYV$DEBUG_CONTROL
bs_dbctl  address  p,dbctl
.
          ref      jobth
jobth     alias    JMV$JOB_TRAP_HANDLER
bs_jobth  address  p,jobth
.
          ref      scb
scb       alias    MTV$SCB
bs_scb    address  p,scb
.
          ref      spit
spit      alias    SYP$SET_PROCESS_INTERVAL_TIMER
bs_spit   address  c,spit
.
bs_raprc  address  c,raproc
.
bs_rtprc  address  c,rtproc
*copyc SYA$MONITOR_FLAG_HANDLERS
          page
.* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
.
. PROCEDURE [XDCL, #GATE] syp$purge_instruction_stack;
.
. This procedure is called to purge the intruction stack in system core.
. (Current use is after changing code via a super_change_memory command in
. the system core debugger.)
.
.* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
          use      code
          defg     prg_istk
prg_istk  alias    syp$purge_instruction_stack
prg_istk  bss      0
          addaq    a0,a1,24
          purge    x0,4                .Purge the instruction stack (CYBER-2000 only)
.
. The following field definition is used to support the PSFSA instruction which is
. required for CYBER-2000 but is not available in the ASSEMBLER language yet.
. When it is available, replace the VFD line with the following line:
.         psfsa                        .Purge the SFSA pushdown (CYBER-2000 only)
.
          vfd,16   0701(16)            .Purge the SFSA pushdown (CYBER-2000 only)
          return
.* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
          end
