Classic Computer Magazine Archive PROGRAM LISTING: 89-02a/SPELLING.M65


0100 ; SPELLING FLASH CARDS
0110 ; BY ANDY BARTON
0120 ; (c)1988, ANTIC PUBLISHING
0130 ;
0140 ; ASM TO MOVE BLOCKS OF DATA
0150 ; AND REDEFINE DISPLAY LIST
0160 ;
0170 ;DEFINITIONS
0180 ; $F0-$F1 = FROM ADR
0190 ; $D4-$D5 = TO ADR
0200 ; $EE-$EF = COUNT OR DL ADR
0210     *=  $0600
0220 ;TO MOVE > 256 BYTES
0230 DM
0240     PLA 
0250     JSR LOAD
0260 DM1
0270     LDY #0
0280     LDA ($F0),Y
0290     STA ($D4),Y
0300     INC $D4
0310     BNE DM2
0320 ;
0330     INC $D5
0340 DM2
0350     INC $F0
0360     BNE DM3
0370 ;
0380     INC $F1
0390 DM3
0400     DEC $EE
0410     BNE DM1
0420 ;
0430     DEC $EF
0440     BPL DM1
0450 ;
0460     RTS 
0470 ;
0480 ;MOVE MEM AND ALTER DISPLAY LIST
0490 ;
0500 ;X=USR      (ADLON,
0510 ;[SAVE 160]  SC+400,ADR(S$),160,
0520 ;[BLANK 80]  ADR(S$),SC+400,80,
0530 ;[MOVE UP ]  SC+560,SC+480,400,
0540 ;[ALTER DL]  ADL.DATA,DL+15,4)
0550 ;
0560 ADLON
0570     PLA 
0580 ;SAVE 160 BYTES
0590     JSR LOAD
0600     JSR SM
0610 ;BLANK-OUT WINDOW
0620     JSR LOAD
0630     JSR SM
0640 ;MOVE UP 400 BYTES
0650     JSR LOAD
0660     JSR DM1
0670 ;ALTER DL
0680     JSR LOAD
0690     JSR SM
0700     RTS 
0710 ;
0720 ;MOVE MEN & RESTORE DISPLAY LIST
0730 ;X=USR      (ADLOFF,
0740 ;[DOWN]      SC+879,SC+959,400,
0750 ;[RESTORE]   ADR(S$),SC+400,160
0760 ;[ DL ]      DL+14,DL+15,4)
0770 ;
0780 ADLOFF
0790     PLA 
0800 ;MOVE DOWN 400
0810     JSR LOAD
0820     LDY #0
0830 RDM
0840     LDA ($F0),Y
0850     STA ($D4),Y
0860     DEC $D4
0870     BNE RDM1
0880 ;
0890     DEC $D5
0900 RDM1
0910     DEC $F0
0920     BNE RDM2
0930 ;
0940     DEC $F1
0950 RDM2
0960     DEC $EE
0970     BNE RDM
0980 ;
0990     DEC $EF
1000     BPL RDM
1010 ;
1020 ;RESTORE 160
1030 ;
1040     JSR LOAD
1050     JSR SM
1060 ;RESTORE DL
1070     JSR LOAD
1080     JSR SM
1090     RTS 
1100 ;SUBROUTINES
1110 ;
1120 LOAD
1130     PLA 
1140     TAX 
1150     PLA 
1160     TAY 
1170     PLA 
1180     STA $F1
1190     PLA 
1200     STA $F0
1210     PLA 
1220     STA $D5
1230     PLA 
1240     STA $D4
1250     PLA 
1260     STA $EF
1270     PLA 
1280     STA $EE
1290     TYA 
1300     PHA 
1310     TXA 
1320     PHA 
1330     RTS 
1340 ;
1350 ;MOVE <256 BYTES
1360 SM
1370     LDX $EE
1380     LDY #0
1390 SM1
1400     LDA ($F0),Y
1410     STA ($D4),Y
1420     INY 
1430     DEX 
1440     BNE SM1
1450 ;
1460     RTS 
1470 ;
1480 ;ALTERNATE DL DATA
1490 ;
1500 ADL.DATA
1510     .BYTE 6,7,10,10
1520 ;
1530     .OPT NO LIST


Back to previous page