*Ticker Tape 2 *Stores Text starting at 0500H and punches everything at once with INCH EQU $E63E OUTEEE EQU $E672 ORG $0300 Start program at 0300H START LDX #$0500 Point to start of text string storage space NXTCHR STX $80 Store the IX value in scratchpad JSR INCH Get character, no echo JSR OUTEEE Echo locally CMPA #$0D Check for which ends text entry BEQ PUNLDR Punch out the leader then entire text message LDX $80 Get the IX back STAA 0,X Store each character of the message INX BRA NXTCHR Get another letter PUNLDR LDX $80 STAA 0,X Store the ending character LDX #$0500 Point IX at start of text message STX $80 Reinitialize IX storage location in scratchpad LDAB #$19 BSR PUNBSP Punch Leader <5 blank characters> GRABCHR LDX $80 Get the message pointer from scratchpad LDAA 0,X Grab a message character CMPA #$0D BEQ PUNTR All done with message, punch trailer INX STX $0080 Update the message pointer in scratchpad LDX #$0400 First address of lookup table CHKNEXT LDAB 0,X CBA BEQ LDDATA Get the next 5 data bytes LDAB #$06 Skip character + 5 SKIP5 INX DECB BNE SKIP5 CPX #$04E4 Check for end of the table, i.e., character not found BNE CHKNEXT RTS Invalid character - Abort to Humbug LDDATA INX Point to first data byte LDAB #$05 Read 5 data bytes NEXTBYT LDAA 0,X Grab the data byte to be punched JSR OUTEEE JSR to OUTEEE (punch data byte) INX DECB BNE NEXTBYT LDAB #$02 Sets the number of spaces between characters BSR PUNBSP Punch blank spaces between characters BRA GRABCHR Get next character PUNBSP LDAA #$00 Punch ACC-B blank spaces NEXTSP JSR OUTEEE DECB BNE NEXTSP RTS PUNTR LDAB #$16 Punch Trailer - All done. BSR PUNBSP RTS Done