
 1010  *SAVE PRODOS.SNOOPER
 1020  *--------------------------------
 1030         .OR $300
 1040         .OP 65C02    (If you have one)
 1050  *--------------------------------
 1060  SLOT   .EQ 6
 1070  DRIVES .EQ 2
 1080  *--------------------------------
 1090  BUFFER .EQ $800
 1100  *--------------------------------
 1110  A300   JMP INSTALL.SNOOPER
 1120  A303   JMP DISPLAY
 1130  *--------------------------------
 1140  INSTALL.SNOOPER
 1150         LDX #1
 1160  .1     LDA 2*SLOT+$BF10,X
 1170         PHA          SAVE CURRENT DRIVER ADDRESS
 1180         LDA DRIVER,X INSTALL NEW DRIVER ADDRESS
 1190         STA 2*SLOT+$BF10,X
 1200    .DO DRIVES=2
 1210         STA 2*SLOT+$BF20,X
 1220    .FIN
 1230         PLA          REMEMBER OLD DRIVER
 1240         STA DRIVER,X
 1250         LDA BUFFER.ADDR,X
 1260         STA A+1,X
 1270         DEX
 1280         BPL .1       NOW THE OTHER BYTE
 1290         RTS
 1300  *--------------------------------
 1310  DRIVER      .DA SNOOPER
 1320  BUFFER.ADDR .DA BUFFER
 1330  *--------------------------------
 1340  SNOOPER
 1350         PHA
 1360         PHY      (If no 65C02 use TYA, PHA)
 1370         PHX      (If no 65C02 use TXA, PHA)
 1380         TSX
 1390         LDA $104,X   LO-BYTE OF RETURN ADDR
 1400         JSR STORE.BYTE
 1410         LDA $105,X   HI-BYTE OF RETURN ADDR
 1420         JSR STORE.BYTE
 1430         LDX #0       $42...47
 1440  .1     LDA $42,X    WHICH ARE THE PARAMETERS
 1450         JSR STORE.BYTE     FOR THE CALL
 1460         INX
 1470         CPX #6
 1480         BCC .1
 1490         PLX      (If no 65C02 use PLA, TAX)
 1500         PLY      (If no 65C02 use PLA, TAY)
 1510         PLA
 1520         JMP (DRIVER) CONTINUE IN DRIVER
 1530  *--------------------------------
 1540  STORE.BYTE
 1550  A      STA BUFFER   THIS ADDRESS IS MODIFIED
 1560         INC A+1      BUMP PNTR TO NEXT ADDRESS
 1570         BNE .1
 1580         INC A+2
 1590  .1     RTS
 1600  *--------------------------------
 1610  COUT   .EQ $FDED
 1620  CROUT  .EQ $FD8E
 1630  PRBYTE .EQ $FDDA
 1640  PNTR   .EQ $00,01
 1650  *--------------------------------
 1660  DISPLAY
 1670         LDA #BUFFER  SET UP PNTR INTO BUFFER
 1680         STA PNTR
 1690         LDA /BUFFER
 1700         STA PNTR+1
 1710  *---CHECK IF FINISHED------------
 1720  .1     LDA PNTR
 1730         CMP A+1
 1740         LDA PNTR+1
 1750         SBC A+2
 1760         BCC .2
 1770         RTS
 1780  *---DISPLAY NEXT 8 BYTES---------
 1790  .2     LDY #1
 1800         JSR WORD     DISPLAY RETURN ADDRESS
 1810         LDA #":"     "XXXX:"
 1820         JSR COUT
 1830         JSR BYTE     DISPLAY ($42)=OPCODE
 1840         JSR BYTE     DISPLAY ($43)=UNIT NUMBER
 1850         INY
 1860         JSR WORD     DISPLAY ($44,45)=BUFFER ADDR 
 1870         JSR DOT
 1880         JSR WORD     DISPLAY ($46,47)=BLOCK NUMBER
 1890         JSR CROUT    CARRIAGE RETURN
 1900         LDA PNTR     ADVANCE PNTR TO NEXT
 1910         CLC               GROUP OF 8 BYTES
 1920         ADC #8
 1930         STA PNTR
 1940         BCC .1
 1950         INC PNTR+1
 1960         BNE .1       ...ALWAYS
 1970  *--------------------------------
 1980  WORD   LDA (PNTR),Y      DISPLAY HI-BYTE
 1990         JSR PRBYTE
 2000         DEY               DISPLAY LO-BYTE
 2010         LDA (PNTR),Y
 2020         INY
 2030         INY               ADVANCE INDEX
 2040         JMP PRBYTE
 2060  *--------------------------------
 2070  BYTE   LDA (PNTR),Y      DISPLAY BYTE
 2080         JSR PRBYTE
 2090  DOT    LDA #"."          PRINT "."
 2100         INY               ADVANCE INDEX
 2110         JMP COUT
 2120  *--------------------------------

