
 1000  *---------------------------------
 1010  *      MONITOR EXTENSIONS
 1020  *---------------------------------
 1030  MON.YSAV   .EQ $34
 1040  PC         .EQ $3A,3B
 1050  BGN.ADDR   .EQ $3C,3D
 1060  END.ADDR   .EQ $3E,3F
 1070  WBUF       .EQ $200
 1080  MON.PRNTYX .EQ $F940
 1090  MON.NXTA1  .EQ $FCBA
 1100  MON.XAM8   .EQ $FDA3
 1110  MON.COUT   .EQ $FDED
 1120  MON.LIST   .EQ $FE63
 1130  MON.A1PC   .EQ $FE75
 1140  *---------------------------------
 1150         .OR $300
 1160  *---------------------------------
 1170  SETUP  LDA #CTRLY
 1180         STA $3F9
 1190         LDA /CTRLY
 1200         STA $3FA
 1210         RTS
 1220  *---------------------------------
 1230  CTRLY  CMP #$AD     MINUS?
 1240         BEQ SUB
 1250         CMP #$AB     PLUS?
 1260         BEQ ADD
 1270         CMP #$BA     COLON?
 1280         BEQ RETURN
 1290         LDY MON.YSAV LOOK BEYOND CONTROL-Y
 1300         LDA WBUF,Y
 1310         LDY #0
 1320         CMP #'L+$80
 1330         BNE DUMP
 1340         INC MON.YSAV
 1350  *---------------------------------
 1360  DISASM JSR MON.A1PC
 1370  .1     LDA #1       DISASSEMBLE ONE LINE
 1380         JSR MON.LIST
 1390         CLC
 1400         LDA PC
 1410         SBC END.ADDR
 1420         LDA PC+1
 1430         SBC END.ADDR+1
 1440         BCC .1
 1450  RETURN RTS
 1460  *---------------------------------
 1470  DUMP   LDA END.ADDR
 1480         ORA #7       FINISH LAST ROW OF 8
 1490         STA PC
 1500         LDA END.ADDR+1
 1510         STA PC+1
 1520         LDA BGN.ADDR START WITH FULL ROW OF 8
 1530         AND #$F8
 1540         STA BGN.ADDR
 1550  .1     JSR MON.XAM8
 1560         SEC          BACK UP POINTER FOR ROW
 1570         LDA BGN.ADDR
 1580         SBC #8
 1590         STA BGN.ADDR
 1600         BCS .2       NO BORROW
 1610         DEC BGN.ADDR+1
 1620  .2     LDA #$A0     PRINT BLANK
 1630         JSR MON.COUT
 1640  .3     LDY #0
 1650         LDA (BGN.ADDR),Y
 1660         ORA #$80     MAKE NORMAL VIDEO
 1670         CMP #$A0     SEE IF PRINTABLE
 1680         BCS .4       YES
 1690         EOR #$C0     MAKE CONTROLS INTO FLASHING ALPHA
 1700  .4     JSR MON.COUT PRINT IT
 1710         JSR MON.NXTA1  ADVANCE POINTER
 1720         BCC .3       MORE ON THIS ROW
 1730         LDA BGN.ADDR
 1740         CMP PC       SEE IF FINISHED WITH DUMP
 1750         LDA BGN.ADDR+1
 1760         SBC PC+1
 1770         BCC .1       NO
 1780         RTS          YES
 1790  *---------------------------------
 1800  SUB    SEC
 1810         LDA BGN.ADDR
 1820         SBC END.ADDR
 1830         TAX
 1840         LDA BGN.ADDR+1
 1850         SBC END.ADDR+1
 1860         JMP AS1
 1870  *---------------------------------
 1880  ADD    CLC
 1890         LDA BGN.ADDR
 1900         ADC END.ADDR
 1910         TAX
 1920         LDA BGN.ADDR+1
 1930         ADC END.ADDR+1
 1940  AS1    TAY
 1950         
 1960         LDA #$BD     EQUAL SIGN
 1970         JSR MON.COUT
 1980         JMP MON.PRNTYX

