
 1000  *--------------------------------
 1010  * MACRO: >CRT SRC,DSPMODE,MSG
 1020  *        >CRT SRC,DSPMODE,MSG,REPMODE
 1030  * MACRO: >CRT SRC,DSPMODE,MSG,REPMODE,REPADDR
 1040  *--------------------------------
 1050         .MA CRT
 1060         LDY #0       INITIALIZE INDEX
 1070         .DO ']1='L   *** LITERAL MESSAGE ***
 1080  :1     LDA :9,Y     GET MESSAGE CHARACTER
 1090         .ELSE        *** ADDRESSED MESSAGE ***
 1100  :1     LDA ]3,Y     GET MESSAGE CHARACTER
 1110         .FIN
 1120         PHA          SAVE CHARACTER ON STACK
 1130  *--------------------------------
 1140         .DO ']2='N   *** NORMAL DISPLAY ***
 1150         ORA #$80     SET TOP BIT OF CHARACTER
 1160         .ELSE        *** INVERSE DISPLAY ***
 1170         AND #$3F
 1180         .FIN
 1190  *--------------------------------
 1200         JSR $FDF0    DISPLAY CHARACTER
 1210         INY          POINT TO NEXT CHARACTER
 1220         PLA          GET ORIGINAL CHARACTER
 1230         BMI :1       MORE IF TOP BIT = 1
 1240  *--------------------------------
 1250         .DO ']1='L   *** LITERAL ***
 1260         BPL :2       ...ALWAYS
 1270  :9     .AT -']3'    MESSAGE ITSELF
 1280  :2
 1290         .FIN
 1300  *--------------------------------
 1310         .DO ]#=3     *** DISPLAY ONLY ***
 1320         LDA #$8D     CARRIAGE RETURN
 1330         JSR $FDF0
 1340         .ELSE
 1350         .DO ']4='R   *** STRING REPLY EXPECTED ***
 1360         LDA #$8D     CARRIAGE RETURN
 1370         JSR $FDF0
 1380         JSR $FD6F    READ REPLY
 1390         .DO ]#=5     *** SPECIFY REPLY LOCATION ***
 1400         LDY #0
 1410  :3     LDA $200,Y   MOVE REPLY TO CALLER'S BUFFER
 1420         STA ]5,Y
 1430         INY
 1440         CMP #$8D     WAS IT END OF LINE?
 1450         BNE :3       MORE TO MOVE
 1460         .FIN
 1470         .ELSE
 1480         LDA #$A0     ADD ONE BLANK TO MESSAGE
 1490         JSR $FDF0
 1500  :5     JSR $FD0C    GET REPLY CHARACTER
 1510         .DO ']4='Y   *** Y/N REPLY ***
 1520         CMP #'Y+$80
 1530         BEQ :6
 1540         CMP #'N+$80
 1550         BNE :5       NEITHER Y NOR N
 1560  :6
 1570         .FIN
 1580         PHA          SAVE REPLY
 1590         JSR $FDF0    DISPLAY THE CHARACTER
 1600         LDA #$8D
 1610         JSR $FDF0    CARRIAGE RETURN
 1620         PLA          GET REPLY CHARACTER
 1630         .DO ']4='Y   *** Y/N REPLY ***
 1640         CMP #'Y+$80  .EQ. IF "Y", .NE. IF "N"
 1650         .FIN
 1660         .FIN
 1670         .FIN
 1680         .EM
 1690  *--------------------------------
 1700         >CRT L,N,"ABCDEFG"
 1710         >CRT L,I,"ABCDEFG"
 1720         >CRT A,N,MSG
 1730         >CRT A,I,MSG
 1740  *--------------------------------
 1750         >CRT L,N,"ABCDEFG",Y
 1760         >CRT L,I,"ABCDEFG",I
 1770         >CRT A,N,MSG,R
 1780         >CRT A,I,MSG,R,BUFFER
 1790         RTS
 1800  MSG    .AT -/MESSAGE/
 1810  BUFFER .BS 256

