10 ; THIS ROUTINE WILL CRATE 15 ; MOVING STARS 16 ; 20 NONAME = $CB 30 VDSLST = $0200 50 SDLSTL = $0230 60 SDLSTH = $0231 70 COLOR2 = $02C6 80 COLOR4 = $02C8 0100 HPOSM3 = $D007 0110 GRAFM = $D011 0120 RANDOM = $D20A 0130 WSYNC = $D40A 0140 NMIEN = $D40E 0150 SYSVBV = $E45F 0180 ;----------------------------- 0190 *= $8000 0200 LDA #$00 0220 STA NMIEN ;$D40E 0230 STA $D018 ;COLPF2 0240 STA $D01A ;COLBK 0250 STA COLOR2 ;$02C6 0260 STA COLOR4 ;$02C8 0270 LDA # DLI 0300 STA VDSLST+1 ;$0201 0310 LDA # CNT2RUT 0340 STA 553 0342 LDA #1 0344 STA 538 0350 LDX #$10 0360 L0006 LDA RANDOM ;$D20A 0370 STA L0003,X ;$5000 0380 LDA RANDOM ;$D20A 0390 AND #$03 0400 STA L0004,X ;$5100 0410 INC L0004,X ;$5100 0420 LDA RANDOM ;$D20A 0430 STA L0005,X ;$5200 0440 INX 0450 BNE L0006 0460 LDA SDLSTL ;560 0470 STA NONAME ;$CB 0480 LDA SDLSTH ;561 0490 STA NONAME+1 ;$CC 0500 LDY #$02 0510 LDA #$F0 0520 STA (NONAME),Y ;$0000 0530 LDA #$C0 0540 STA NMIEN ;$D40E 0554 RTS 0555 ;----------------------------- 0560 DLI PHA 0570 TYA 0580 PHA 0590 LDA #$80 0600 STA GRAFM ;$D011 0610 LDY #$D0 ;(size of scrn) 0620 L0011 LDA L0008,Y ;$4FFF 0630 STA WSYNC ;$D40A 0640 STA HPOSM3 ;$D007 0650 LDA L0009,Y ;$51FF 0660 STA $D015 ;COLPM3 0670 DEY 0680 BNE L0011 0690 LDA #$00 0700 STA GRAFM ;$D011 0710 PLA 0720 TAY 0730 PLA 0740 RTI 0745 ;----------------------------- 0750 CNT2RUT LDY #$00 0760 L0012 LDA L0003,Y ;$5000 0770 CLC 0780 SBC L0004,Y ;ADC changes 0790 STA L0003,Y ;direction 0800 DEY 0810 BNE L0012 0812 LDA #1 0814 STA 538 0820 RTS 0825 ;------------------------------ 0860 L0003 = $5000 0870 L0004 = $5100 0880 L0005 = $5200 0900 L0008 = $4FFF 0910 L0009 = $51FF 0930 ; 0940 *= $02E2 0950 .WORD $8000