
 1000  *--------------------------------
 1010  *       APPLE-TALKER FROM S-C SOFTWARE CORP.
 1020  *--------------------------------
 1030  MON.NXTA .EQ $FCBA     BUMP AND TEST A1
 1040  *--------------------------------
 1050  CASSETTE .EQ $C060     CASSETTE INPUT LEVEL
 1060  SPEAKER  .EQ $C030     SPEAKER OUTPUT
 1070  STROBE   .EQ $C010
 1080  KEYBOARD .EQ $C000
 1090  *--------------------------------
 1100  LAST     .EQ $2F       LAST CASSETTE INPUT LEVEL
 1110  A1L      .EQ $3C       MONITOR A1L, A1H, A2L, A2H
 1120  *--------------------------------
 1130  BUFFER   .DA $4000     FWA OF BUFFER
 1140           .DA $5FFF     LWA OF BUFFER
 1150  *--------------------------------
 1160  *    ECHO CASSETTE THRU SPEAKER
 1170  *--------------------------------
 1180  ECHO   LDY #30       150 USEC DELAY
 1190  .1     DEY
 1200         BNE .1
 1210         LDA CASSETTE
 1220         EOR LAST      SEE IF TOGGLED
 1230         BPL ECHO      NO
 1240         EOR LAST      YES
 1250         STA LAST
 1260         LDA SPEAKER   TOGGLE SPEAKER
 1270         LDA KEYBOARD
 1280         BPL ECHO
 1290         STA STROBE
 1300         RTS
 1310  *--------------------------------
 1320  *    SET UP BUFFER ADDRESSES
 1330  *--------------------------------
 1340  SETUP  LDX #3
 1350  .1     LDA BUFFER,X
 1360         STA A1L,X
 1370         DEX
 1380         BPL .1
 1390         STX LAST
 1400         LDA $C050    SELECT HGR2 FOR VIEWING
 1410         LDA $C052
 1420         LDA $C055
 1430         LDA $C057
 1440         RTS
 1450  *--------------------------------
 1460  *    RESTORE NORMAL SCREEN AND EXIT
 1470  *--------------------------------
 1480  FINISH LDA $C051
 1490         LDA $C053
 1500         LDA $C054
 1510         LDA $C056
 1520         RTS
 1530  *--------------------------------
 1540  *    STORE SPEECH IN BUFFER
 1550  *--------------------------------
 1560  RECORD JSR SETUP     SET UP BUFFER ADDRESSES
 1570  .1     LDX #8        EIGHT BITS
 1580  .2     PHA           PUSH BYTE WE ARE FILLING
 1590         LDY #30
 1600  .3     DEY           150 USEC DELAY
 1610         BNE .3 
 1620         LDA CASSETTE  READ CASSETTE LEVEL
 1630         ASL           LEVEL INTO CARRY BIT
 1640         PLA
 1650         ROL           MERGE LEVEL INTO BYTE
 1660         DEX
 1670         BNE .2        BYTE NOT FULL YET
 1680         STA (A1L,X)   STORE NEXT WORD IN BUFFER
 1690         JSR MON.NXTA      BUMP & TEST POINTER
 1700         BCC .1        NOT THRU
 1710         JMP FINISH
 1720  *--------------------------------
 1730  *    PLAYBACK SPEECH FROM BUFFER
 1740  *--------------------------------
 1750  TALK   JSR SETUP     SET UP BUFFER ADDRESSES
 1760  .1     LDX #0
 1770         LDA (A1L,X)   GET NEXT WORD FROM BUFFER
 1780         LDX #8        EIGHT BITS
 1790  .2     LDY #30
 1800  .3     DEY           150 USEC DELAY
 1810         BNE .3 
 1820         EOR LAST      TEST IF LEVEL CHANGED
 1830         BPL .5        NO
 1840         EOR LAST      YES, RESTORE (A)
 1850         STA LAST      UPDATE LEVEL
 1860         LDY SPEAKER   TOGGLE SPEAKER
 1870  .4     ASL
 1880         DEX
 1890         BNE .2 
 1900         JSR MON.NXTA      BUMP & TEST POINTER
 1910         BCC .1        NOT THRU
 1920         JMP FINISH
 1930  .5     EOR LAST      RESTORE (A)
 1940         JMP .6        EVEN OUT TIMING
 1950  .6     JMP .4 

