
 1000  *--------------------------------
 1010  *      MONITOR CTRL-Y COMMAND
 1020  *
 1030  *      TO SET AND CLEAR ANY COMBINATION
 1040  *      OF BITS IN A RANGE OF MEMORY
 1050  *
 1060  *      *MASK<ADR1.ADR2Y   (WHERE Y MEANS CTRL-Y)
 1070  *
 1080  *      MASK = XXYY  BITS = 0 IN YY WILL BE CLEARED
 1090  *                   BITS = 1 IN XX WILL BE SET
 1100  *--------------------------------
 1110  A1     .EQ $3C
 1120  A4L    .EQ $42
 1130  A4H    .EQ $43
 1140  STACK  .EQ $100
 1150  *--------------------------------
 1160  SETUP  JSR $FF58    FIND SELF FIRST
 1170         TSX
 1180         CLC
 1190         LDA #BITS-SETUP-2
 1200         .DA #$7D,STACK-1    FORCE ABS,X MODE
 1210         STA $3F9          MONITOR CTRL-Y VECTOR
 1220         LDA /BITS-SETUP-2
 1230         ADC STACK,X
 1240         STA $3FA
 1250         RTS
 1260  *--------------------------------
 1270  BITS   LDA (A1),Y   GET NEXT BYTE IN SPECIFIED RANGE
 1280         AND A4L      CLEAR BITS USING LO-BYTE OF MASK
 1290         ORA A4H      SET BITS FROM HI-BYTE OF MASK
 1300         STA (A1),Y   STORE MODIFIED BYTE
 1310         JSR $FCBA    ADVANCE POINTER
 1320         BCC BITS     MORE IN RANGE
 1330         RTS          FINISHED
 1340  *--------------------------------

