
 1000   .LIST OFF
 1010  *SAVE S.02.CALL.SEQ
 1020  *--------------------------------
 1030  T1     LDA #MESSAGE.1
 1040         PHA
 1050         LDA /MESSAGE.1
 1060         PHA
 1070         JSR PRINT.IT
 1080         LDA #MESSAGE.2
 1090         PHA
 1100         LDA /MESSAGE.2
 1110         PHA
 1120         JSR PRINT.IT
 1130         RTS
 1140  *--------------------------------
 1150  MESSAGE.1
 1160         .HS 8D
 1170         .AS -/MESSAGE ONE/
 1180         .HS 8D.00
 1190  MESSAGE.2
 1200         .HS 8D
 1210         .AS -/MESSAGE TWO/
 1220         .HS 8D.00
 1230  *--------------------------------
 1240         .LIST ON
 1250  RETURN.SAVE  .EQ $00,01
 1260  PNTR         .EQ $02,03
 1270  PRINT.IT
 1280         PLA          POP RETURN ADDRESS
 1290         STA RETURN.SAVE+1
 1300         PLA
 1310         STA RETURN.SAVE
 1320         PLA          POP MESSAGE ADDRESS
 1330         STA PNTR+1
 1340         PLA
 1350         STA PNTR
 1360         LDY #0       STARTING INDEX
 1370  .1     LDA (PNTR),Y  NEXT CHARACTER OF MESSAGE
 1380         BEQ .2       ...TERMINATING $00
 1390         JSR $FDED    PRINT THE CHAR
 1400         INY
 1410         BNE .1       ...ALWAYS
 1420  .2     LDA RETURN.SAVE
 1430         PHA          RELOAD RETURN ADDRESS
 1440         LDA RETURN.SAVE+1
 1450         PHA
 1460         RTS          RETURN TO CALLER
 1470     .LIST OFF
 1480  *--------------------------------
 1490  *      JSR PRINT.MSG
 1500  *      text of message, terminating zero
 1510  *--------------------------------
 1520  T2
 1530         JSR PRINT.MSG
 1540         .HS 8D
 1550         .AS -/MESSAGE AFTER JSR/
 1560         .HS 8D.00
 1570         JSR PRINT.MSG
 1580         .HS 8D
 1590         .AS -/ANOTHER MESSAGE/
 1600         .HS 8D.00
 1610         RTS
 1620  *--------------------------------
 1630         .LIST ON
 1640  PRINT.MSG
 1650         PLA          GET RETURN ADDRESS
 1660         STA .1+1     LO-BYTE
 1670         PLA
 1680         STA .1+2     HI-BYTE
 1690         LDY #1
 1700  .1     LDA $9999,Y  ADDRESS FILLED IN
 1710         BEQ .2       ...TERMINATING $00
 1720         JSR $FDED    PRINT THE CHAR
 1730         INY
 1740         BNE .1       ...ALWAYS
 1750  .2     TYA          ADJUST THE RETURN ADDRESS
 1760         CLC          BY ADDING THE MESSAGE LENGTH
 1770         ADC .1+1
 1780         TAY          SAVE LO BYTE FOR A WHILE
 1790         LDA #0       THE HIGH BYTE TOO
 1800         ADC .1+2
 1810         PHA
 1820         TYA
 1830         PHA
 1840         RTS          RETURN TO CALLER
 1850  *--------------------------------

