Home » Personal collection » Commodore disks » disk44a_mandelbrot.d64 » mandelcode11
mandelcode11
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Commodore disks » disk44a_mandelbrot.d64 |
Filename: | mandelcode11 |
Read OK: | ✔ |
File size: | 34C3 bytes |
Load address: | 0801 |
Exec address: | 0000 |
File contents
10 ;MANDLEPLOT 20 ;SOURCE CODE 30 ;22/10/95 40 ; 100 *=$0E00 110 XPIXEL=$4103 120 YPIXEL=$4104 130 COLOUR=$4105 140 YPIB=$4106 150 MAXCOL=$4107 160 XP=$4108 170 YP=$4109 180 XPB=$410A 190 CLICK=$410B 200 HOUR=$410C 210 XPIB=$410D 220 XPBIB=$410E 300 ; SPRITE DATA 305 ; 310 TXT 224,000,000,176,000,000,152,000 320 TXT 000,140,000,000,134,000,000,131 330 TXT 000,000,129,128,000,128,192,000 340 TXT 128,064,000,147,192,000,185,000 350 TXT 000,233,000,000,009,128,000,012 360 TXT 128,000,004,128,000,004,128,000 370 TXT 007,128,000,000,000,000,000,000 380 TXT 000,000,000,000,000,000,000,153 385 ; 390 TXT 000,000,000,064,000,000,096,000 400 TXT 000,112,000,000,120,000,000,124 410 TXT 000,000,126,000,000,127,000,000 420 TXT 127,128,000,108,000,000,070,000 430 TXT 000,006,000,000,006,000,000,003 440 TXT 000,000,003,000,000,003,000,000 450 TXT 000,000,000,000,000,000,000,000 460 TXT 000,000,000,000,000,000,000,153 465 ; 470 TXT 255,192,000,129,064,000,128,064 480 TXT 000,129,064,000,066,128,000,064 490 TXT 128,000,051,000,000,012,000,000 500 TXT 055,000,000,065,128,000,066,128 510 TXT 000,129,064,000,130,192,000,133 520 TXT 064,000,255,192,000,000,000,000 530 TXT 000,000,000,000,000,000,000,000 540 TXT 000,000,000,000,000,000,000,197 545 ; 550 TXT 255,192,000,255,192,000,255,192 560 TXT 000,255,192,000,127,128,000,127 570 TXT 128,000,063,000,000,012,000,000 580 TXT 063,000,000,127,128,000,127,128 590 TXT 000,255,192,000,255,192,000,255 600 TXT 192,000,255,192,000,000,000,000 610 TXT 000,000,000,000,000,000,000,000 620 TXT 000,000,000,000,000,000,000,197 625 ; 630 TXT 168,000,000,000,000,000,128,000 640 TXT 000,000,000,000,128,000,000,000 650 TXT 000,000,000,000,000,000,000,000 660 TXT 000,000,000,000,000,000,000,000 670 TXT 000,000,000,000,000,000,000,000 680 TXT 000,000,000,000,000,000,000,000 690 TXT 000,000,000,000,000,000,000,000 700 TXT 000,000,000,000,000,000,000,197 705 ; 710 TXT 000,000,021,000,000,000,000,000 720 TXT 001,000,000,000,000,000,001,000 730 TXT 000,000,000,000,000,000,000,000 740 TXT 000,000,000,000,000,000,000,000 750 TXT 000,000,000,000,000,000,000,000 760 TXT 000,000,000,000,000,000,000,000 770 TXT 000,000,000,000,000,000,000,000 780 TXT 000,000,000,000,000,000,000,000 785 ; 790 TXT 000,000,000,000,000,000,000,000 800 TXT 000,000,000,000,000,000,000,000 810 TXT 000,000,000,000,000,000,000,000 820 TXT 000,000,000,000,000,000,000,000 830 TXT 000,000,000,000,000,000,000,000 840 TXT 000,000,000,000,000,000,000,000 850 TXT 128,000,000,000,000,000,128,000 860 TXT 000,000,000,000,168,000,000,000 865 ; 870 TXT 000,000,000,000,000,000,000,000 880 TXT 000,000,000,000,000,000,000,000 890 TXT 000,000,000,000,000,000,000,000 900 TXT 000,000,000,000,000,000,000,000 910 TXT 000,000,000,000,000,000,000,000 920 TXT 000,000,000,000,000,000,000,000 930 TXT 000,000,001,000,000,000,000,000 940 TXT 001,000,000,000,000,000,021,000 945 ; 10000 ; MAIN CONTROL ROUTINES 10010 JSR INIT 10020 JSR HIRESON 10030 CONTROLOP LDA CLICK 10040 BNE CONTROLOP 10050 CONTLOPB LDA CLICK 10060 BEQ CONTLOPB 10070 LDA XP 10080 CMP #$58 10090 BCC CONTCONT 10100 JMP BOX 10110 CONTCONT JMP CONTROLOP 10120 ; THERE IS A LOT MORE TO COME! 12000 ; WIMP ROUTINES 12020 ; WIMP - MOUSE 12030 IRQ LDA #$00 12040 STA CLICK 12050 LDA $C5 12060 CMP #$01 12070 BNE CONCHECK 12080 STA CLICK 12090 CONCHECK CMP #$0C 12100 BEQ LEFTK 12110 LKC CMP #$17 12120 BEQ RIGHTK 12130 RKC CMP #$32 12140 BEQ UPK 12150 UPKC CMP #$37 12160 BEQ DOWNK 12170 DKC LDA $DC00 12190 AND #$01 12200 BEQ UPJ 12210 UJC LDA $DC00 12220 AND #$02 12230 BEQ DOWNJ 12240 DJC LDA $DC00 12250 AND #$04 12260 BEQ LEFTJ 12270 LJC LDA $DC00 12280 AND #$08 12290 BEQ RIGHTJ 12300 RJC LDA $DC00 12310 AND #$10 12320 EOR #$10 12330 BEQ CJCH 12340 STA CLICK 12350 CJCH JMP BOXFLASH 12360 LEFTK JSR LEFT 12370 JMP LKC 12380 RIGHTK JSR RIGHT 12390 JMP RKC 12400 UPK JSR UP 12410 JMP UPKC 12420 DOWNK JSR DOWN 12430 JMP DKC 12440 UPJ JSR UP 12450 JMP UJC 12460 DOWNJ JSR DOWN 12470 JMP DJC 12480 LEFTJ JSR LEFT 12490 JMP LJC 12500 RIGHTJ JSR RIGHT 12510 JMP RJC 12520 LEFT DEC XP 12530 LDA XP 12540 CMP #$FF 12550 BNE NOTFF 12560 LDY #$00 12570 STY XPB 12580 NOTFF LDY XPB 12590 BNE FIN 12600 CMP #$18 12610 BNE FIN 12620 INC XP 12630 FIN JMP CONTROL 12640 RIGHT INC XP 12650 LDA XP 12660 BNE NOT00 12670 LDY #$01 12680 STY XPB 12690 NOT00 LDY XPB 12700 BEQ FIN 12710 CMP #$58 12720 BNE FIN 12730 DEC XP 12740 JMP CONTROL 12750 UP DEC YP 12760 LDA YP 12770 CMP #$32 12780 BNE FIN 12790 INC YP 12800 JMP CONTROL 12810 DOWN INC YP 12820 LDA YP 12830 CMP #$F8 12840 BNE FIN 12850 DEC YP 12860 JMP CONTROL 12870 ; WIMP - POINTER 12880 CONTROL LDA HOUR 12890 BEQ NHGLASS 13210 LDX #$3A 13220 STX $07F8 13230 INX 13240 STX $07F9 13250 NHGLASS LDA XP 13260 STA $D000 13270 STA $D002 13280 LDA YP 13290 STA $D001 13300 STA $D003 13310 LDA $D010 13320 AND #$FC 13330 LSR A 13340 CLC 13350 ADC XPB 13360 ASL A 13370 CLC 13380 ADC XPB 13390 STA $D010 13400 LDA #$00 13410 STA $D027 13420 LDA #$01 13430 STA $D028 13440 LDA $D015 13450 ORA #$03 13460 STA $D015 13470 LDA HOUR 13480 BNE QTRO 13490 LDX #$38 13500 STX $07F8 13510 INX 13520 STX $07F9 13530 QTRO RTS 13540 ; STARTUP ROUTINES 13550 INIT LDA #$00 13560 STA $D020 13570 STA $D021 13580 STA XP 13590 STA HOUR 13600 STA $D015 13610 LDA #$01 13620 STA XPB 13630 LDA #$80 13640 STA YP 13650 HIRESON LDA #$3B 13660 STA $D011 13670 LDA #$D8 13680 STA $D016 13690 LDA #$00 13700 STA $FB 13710 TAY 13720 LDA #$04 13730 STA $FC 13740 LDA #$7E 13750 FLOP STA ($FB),Y 13760 INY 13770 BEQ FLOPINC 13780 CPY #$F8 13790 BNE FLOP 13800 LDX $FC 13810 CPX #$07 13820 BNE FLOP 13830 JSR LEFT 13840 SEI 13850 LDA #<IRQ 13860 STA $0314 13870 LDA #>IRQ 13880 STA $0315 13890 CLI 13900 LDA #$D8 13910 STA $FC 13920 LDA #$02 13930 LDY #$00 13940 FLOPB STA ($FB),Y 13950 INY 13960 BNE FLOPB 13970 INC $FC 13980 LDX $FC 13990 CPX #$DC 14000 BNE FLOPB 14010 LDA #$18 14020 STA $D018 14900 RTS 14910 FLOPINC INC $FC 14920 JMP FLOP 14930 HIRESOFF SEI 14940 LDA #$31 14950 STA $0314 14960 LDA #$EA 14970 STA $0315 14980 CLI 14990 LDA #$00 15000 STA $D015 15010 LDA #$9B 15020 STA $D011 15030 LDA #$C8 15040 STA $D016 15050 RTS 30000 ; MANDLEBROT SET PLOTTER 30010 MANDLE LDA #$00 30020 STA YPIXEL 30030 LDA #$03 30040 STA $4100 30050 LDA #$06 30060 STA $4102 30070 JSR EQUAL 30080 MMAINL LDA #$00 30090 STA XPIXEL 30100 LDA #$01 30110 STA $4100 30120 LDA #$05 30130 STA $4102 30140 JSR EQUAL 30150 MMAINLB LDA #$05 30160 STA $4100 30170 LDA #$07 30180 STA $4102 30190 JSR EQUAL 30200 INC $4100 30210 INC $4102 30220 JSR EQUAL 30230 LDA #$00 30240 STA COLOUR 30250 LOOP LDA #$07 30260 STA $4100 30270 STA $4101 30280 LDA #$10 30290 STA $4102 30300 JSR MULTIPLY 30310 LDA #$08 30320 STA $4100 30330 STA $4101 30340 LDA #$11 30350 STA $4102 30360 JSR MULTIPLY 30370 LDX #$10 30380 STX $4100 30390 INX 30400 STX $4101 30410 INX 30420 STX $4102 30430 JSR ADDITION 30440 LDA $4091 30450 CMP #$04 30460 BCC FAIL 30470 CMP #$50 30480 BCS FAIL 30490 SUCPASS JMP SUCCESS 30500 FAIL INC COLOUR 30505 LDA COLOUR 30510 CMP MAXCOL 30520 BEQ SUCPASS 30530 JSR SUBTRACT 30540 LDA #$12 30550 STA $4100 30560 LDA #$05 30570 STA $4101 30580 LDA #$13 30590 STA $4102 30600 JSR ADDITION 30610 LDA #$07 30620 STA $4100 30630 LDA #$08 30640 STA $4101 30650 INC $4102 30660 JSR MULTIPLY 30670 LDA #$14 30680 STA $4100 30690 LDA #$1C 30700 STA $4101 30710 LDA #$15 30720 STA $4102 30730 JSR MULTIPLY 30740 LDA #$15 30750 STA $4100 30760 LDA #$06 30770 STA $4101 30780 LDA #$16 30790 STA $4102 30800 JSR ADDITION 30810 LDA #$13 30820 STA $4100 30830 LDA #$07 30840 STA $4102 30850 JSR EQUAL 30860 LDA #$16 30870 STA $4100 30880 LDA #$08 30890 STA $4102 30900 JSR EQUAL 30910 JMP LOOP 30920 SUCCESS JSR PLOT 30930 LDA #$05 30940 STA $4100 30950 STA $4102 30960 LDA #$02 30970 STA $4101 30980 JSR ADDITION 30990 LDA XPIXEL 31000 BNE XRELOP 31010 LDA #$06 31020 STA $4100 31030 STA $4102 31040 LDA #$04 31050 STA $4101 31060 JSR ADDITION 31070 INC YPIXEL 31080 LDA YPIXEL 31090 CMP #$C8 31100 BNE YRELOP 31110 RTS 31120 XRELOP JMP MMAINLB 31130 YRELOP JMP MMAINL 40000 ; ARITHMETIC ROUTINES 40010 GETDIGIT CLD 40020 ASL A 40030 ASL A 40040 ASL A 40050 STA $02 40060 TXA 40070 LSR A 40080 STA $24 40090 LDA #$07 40100 SEC 40110 SBC $24 40120 CLC 40130 ADC $02 40140 TAY 40150 LDA $4000,Y 40160 TAY 40170 TXA 40180 AND #$01 40190 BEQ LSNGD 40200 TYA 40210 AND #$F0 40220 LSR A 40230 LSR A 40240 LSR A 40250 LSR A 40260 RTS 40270 LSNGD TYA 40280 AND #$0F 40290 RTS 40300 MULTIPLYB JSR NEGATIVE 40305 LDA $4102 40310 ASL A 40320 ASL A 40330 ASL A 40340 TAX 40350 LDA #$00 40360 TAY 40370 MLOPA STA $4000,X 40380 INY 40390 INX 40400 CPY #$08 40410 BNE MLOPA 40420 LDA #$06 40430 STA $FC 40440 NEWDIGIT LDA $4101 40450 LDX $FC 40460 JSR GETDIGIT 40470 CMP #$00 40480 BEQ DMOVER 40490 STA $FD 40500 LDA #$06 40510 STA $FB 40520 DMLOP LDA $4100 40530 LDX $FB 40540 JSR GETDIGIT 40550 DMLB CMP #$00 40560 BEQ DMOVER 40570 STA $FE 40580 LDA $FB 40590 CLC 40600 ADC $FC 40610 SEC 40620 SBC #$0C 40630 LDX $FD 40640 TAY 40650 AND #$01 40660 BEQ MSKIP 40670 TXA 40680 ASL A 40690 ASL A 40700 ASL A 40710 ASL A 40720 TAX 40730 MSKIP TYA 40740 LSR A 40750 STA $02 40760 LDA #$07 40770 SEC 40780 SBC $02 40790 STA $02 40800 LDA $4102 40810 ASL A 40820 ASL A 40830 ASL A 40840 ADC $02 40850 TAY 40860 STX $24 40870 LDX $02 40880 SED 40890 LDA $4000,Y 40900 CLC 40910 ADC $24 40920 STA $4000,Y 40930 MALP CLD 40940 BCC MAQUIT 40950 DEY 40960 DEX 40970 CPX #$FF 40980 BEQ MAQUIT 40990 SED 41000 LDA $4000,Y 41010 CLC 41020 ADC #$01 41030 STA $4000,Y 41040 JMP MALP 41050 DMOVER INC $FB 41060 LDA $FB 41070 CMP #$0E 41080 BCC DMLOP 41090 INC $FC 41100 LDA $FC 41110 CMP #$0E 41120 BCC NEWDIGIT 41130 LDA YPIB 41140 BEQ QUIT 41150 LDA $4102 41160 STA $4101 41170 LDA #$1D 41180 STA $4100 41190 JSR SUBTRACT 41200 QUIT RTS 41210 MAQUIT LDX $FE 41220 DEX 41230 TXA 41240 JMP DMLB 41250 MSUP LDA $4100 41260 ASL A 41270 ASL A 41280 ASL A 41290 TAX 41300 DEX 41310 STX $FB 41320 LDA $4101 41330 ASL A 41340 ASL A 41350 ASL A 41360 TAX 41370 DEX 41380 STX $FD 41390 LDA $4102 41400 ASL A 41410 ASL A 41420 ASL A 41430 TAX 41440 DEX 41450 STX $22 41460 LDA #$40 41470 STA $FC 41480 STA $FE 41490 STA $23 41500 RTS 41510 EQUAL JSR MSUP 41520 LDY #$08 41530 ELOP LDA ($FB),Y 41540 STA ($22),Y 41550 DEY 41560 BNE ELOP 41570 RTS 41580 ADDITION JSR MSUP 41590 LDY #$08 41600 SED 41610 CLC 41620 ADLOP LDA ($FB),Y 41630 ADC ($FD),Y 41640 STA ($22),Y 41650 DEY 41660 BNE ADLOP 41670 CLD 41680 RTS 41690 SUBTRACT JSR MSUP 41700 LDY #$08 41710 SED 41720 SEC 41730 SULOP LDA ($FB),Y 41740 SBC ($FD),Y 41750 STA ($22),Y 41760 DEY 41770 BNE SULOP 41780 CLD 41790 RTS 41800 NEGATIVE LDA #$00 41810 PHA 41820 LDA $4100 41830 TAY 41840 ASL A 41850 ASL A 41860 ASL A 41870 TAX 41880 LDA $4001,X 41890 CMP #$50 41895 BCC NEGRMOVEAB 41900 PLA 41910 ADC #$00 41920 PHA 41930 JMP NEGRMOVEA 41940 NEGRMOVEAB LDA $4101 41950 TAY 41960 ASL A 41970 ASL A 41980 ASL A 41990 TAX 42000 LDA $4001,X 42010 CMP #$50 42020 PLA 42030 BCC NOEOR 42040 EOR #$01 42050 PHA 42060 BCS NEGRMOVEB 42070 NEGRMOVEBB PLA 42080 NOEOR STA YPIB 42090 RTS 42100 NEGRMOVE LDA $4100 42110 PHA 42120 LDA $4101 42130 PHA 42140 LDA $4102 42150 PHA 42160 TYA 42170 STA $4101 42180 STA $4102 42190 LDA #$1D 42200 STA $4100 42210 JSR SUBTRACT 42220 PLA 42230 STA $4102 42240 PLA 42250 STA $4101 42260 PLA 42270 STA $4100 42280 RTS 42290 NEGRMOVEA JSR NEGRMOVE 42300 JMP NEGRMOVEAB 42310 NEGRMOVEB JSR NEGRMOVE 42320 JMP NEGRMOVEBB 42330 MULTIPLY LDA $4102 42340 PHA 42350 LDA $4101 42360 PHA 42370 LDA #$18 42380 STA $4102 42390 JSR EQUAL 42400 INC $4102 42410 PLA 42420 STA $4100 42430 JSR EQUAL 42440 LDA #$18 42450 STA $4100 42460 LDA #$19 42470 STA $4101 42480 PLA 42490 STA $4102 42500 JMP MULTIPLYB 50000 ; GRAPHIC POINT PLOTTER 50010 PLOTPC LDA #$47 50020 STA $FB 50030 LDA #$3F 50040 STA $FC 50050 LDA YPIXEL 50060 LSR A 50070 LSR A 50080 LSR A 50090 STA YPIB 50100 AND #$03 50110 ASL A 50120 ASL A 50130 ASL A 50140 ASL A 50150 ASL A 50160 ASL A 50170 STA $02 50180 LDA $FB 50190 SEC 50200 SBC $02 50210 STA $FB 50220 LDA $FC 50230 SBC #$00 50235 SBC YPIB 50240 PHA 50250 LDA YPIB 50260 LSR A 50270 LSR A 50280 STA $02 50290 PLA 50300 SEC 50310 SBC $02 50320 STA $FC 50330 LDA YPIXEL 50340 AND #$07 50350 STA YPIB 50360 LDA $FB 50370 SEC 50380 SBC YPIB 50390 PHA 50400 LDA XPIXEL 50410 AND #$F8 50420 STA YPIB 50430 PLA 50440 CLC 50450 ADC YPIB 50460 STA $FB 50470 LDA $FC 50480 SBC #$00 50490 STA $FC 50500 LDA XPIXEL 50510 AND #$07 50520 TAX 50530 LDA #$80 50540 GBITLP CPX #$00 50550 BEQ PPCONT 50560 LSR A 50570 DEX 50580 JMP GBITLP 50590 PPCONT STA $FD 50600 RTS 50610 PLOTON JSR PLOTPC 50620 LDY #$00 50630 LDA ($FB),Y 50640 ORA $FD 50650 STA ($FB),Y 50660 RTS 50670 PLOTOFF JSR PLOTPC 50680 LDA $FD 50690 EOR #$FF 50700 STA $FD 50710 LDY #$00 50720 LDA ($FB),Y 50730 AND $FD 50740 STA ($FB),Y 50750 RTS 50760 PLOT LDA COLOUR 50770 AND #$02 50780 BNE PPAON 50790 JSR PLOTOFF 50800 JMP PPACNT 50810 PPAON JSR PLOTON 50820 PPACNT INC XPIXEL 50830 LDA COLOUR 50840 AND #$01 50850 BNE PPBON 50860 JSR PLOTOFF 50870 JMP PPBCNT 50880 PPBON JSR PLOTON 50890 PPBCNT INC XPIXEL 50900 RTS 60000 ; ZOOM ROUTINES 60010 BOX LDA XP 60020 STA XPIB 60030 LDA YP 60040 STA YPIB 60050 LDA XPB 60060 STA XPBIB 60070 LDX #$3C 60080 STX $07FC 60090 INX 60100 STX $07FD 60110 INX 60120 STX $07FE 60130 INX 60140 STX $07FF 60150 LDA $D015 60160 ORA #$F0 60170 STA $D015 60180 BOXWAIT LDA CLICK 60190 BNE BOXWAIT 60280 BOXLOOP LDA XPBIB 60290 CMP XPB 60300 BEQ CHECKFINE 60310 BCS LESSTHAN 60320 JMP MORETHAN 60330 CHECKFINE LDA XPIB 60340 CMP XP 60350 BCS LESSTHAN 60360 MORETHAN LDA XPIB 60370 STA $D008 60380 STA $D00C 60390 LDX #$00 60400 LDA XPBIB 60410 BEQ NOXPBADD 60420 LDX #$50 60430 NOXPBADD LDA $D010 60440 AND #$AF 60450 STX $02 60460 CLC 60470 ADC $02 60480 STA $D010 60485 LDX #$00 60490 LDA XP 60500 SEC 60510 SBC #$18 60520 STA $D00A 60530 STA $D00E 60540 BCC MTSUB 60550 LDX XPB 60560 BEQ MTSUB 60570 LDX #$A0 60580 MTSUB LDA $D010 60590 AND #$5F 60600 STX $02 60610 CLC 60620 ADC $02 60630 STA $D010 60640 JMP BOXCONT 60650 LESSTHAN LDA XP 60660 LDX XPB 60670 BNE NOTOUT 60680 CMP #$58 60690 BCS NOTOUT 60700 LDA #$58 60710 NOTOUT STA $D008 60720 STA $D00C 60730 CPX #$00 60740 BEQ LTNOADD 60750 LDX #$50 60760 LTNOADD LDA $D010 60770 AND #$AF 60780 STX $02 60790 CLC 60800 ADC $02 60810 STA $D010 60815 LDX #$00 60820 LDA XPIB 60830 SEC 60840 SBC #$18 60850 STA $D00A 60860 STA $D00E 60870 BCC LTSUB 60880 LDX XPBIB 60890 BEQ LTSUB 60900 LDX #$A0 60910 LTSUB LDA $D010 60920 AND #$5F 60930 STX $02 60940 CLC 60950 ADC $02 60960 STA $D010 60970 BOXCONT LDA YP 60980 CMP YPIB 60990 BCC LESSY 61000 LDA YPIB 61010 STA $D009 61020 STA $D00B 61030 LDA YP 61040 SEC 61050 SBC #$15 61060 STA $D00D 61070 STA $D00F 61080 JMP BOXCONTII 61090 LESSY LDA YP 61100 STA $D009 61110 STA $D00B 61120 LDA YPIB 61130 SEC 61140 SBC #$15 61150 STA $D00D 61160 STA $D00F 61170 BOXCONTII LDA CLICK 61180 BNE BOXEND 61190 JMP BOXLOOP 61200 BOXEND JMP CONTROLOP 62000 BOXFLASH LDA $A2 62010 AND #$3C 62020 LSR A 62030 LSR A 62040 TAX 62050 LDA BOXCOLS,X 62060 STA $D02B 62070 STA $D02C 62080 STA $D02D 62090 STA $D02E 62100 JMP $EA31 62110 BOXCOLS TXT 0,9,2,8,10,7,13,1 62120 TXT 1,13,3,5,14,4,6,0
;MANDLEPLOT " ;SOURCE CODE 0 ;22/10/95 6( ; Bd ��$0E00 Sn XPIXEL�$4103 dx YPIXEL�$4104 u� COLOUR�$4105 �� YPIB�$4106 �� MAXCOL�$4107 �� XP�$4108 �� YP�$4109 �� XPB�$410A �� CLICK�$410B �� HOUR�$410C �� XPIB�$410D �� XPBIB�$410E " ,; SPRITE DATA ( 1; P 6TXT 224,000,000,176,000,000,152,000 x @TXT 000,140,000,000,134,000,000,131 � JTXT 000,000,129,128,000,128,192,000 � TTXT 128,064,000,147,192,000,185,000 � ^TXT 000,233,000,000,009,128,000,012 hTXT 128,000,004,128,000,004,128,000 @ rTXT 007,128,000,000,000,000,000,000 h |TXT 000,000,000,000,000,000,000,153 n �; � �TXT 000,000,000,064,000,000,096,000 � �TXT 000,112,000,000,120,000,000,124 � �TXT 000,000,126,000,000,127,000,000 �TXT 127,128,000,108,000,000,070,000 6�TXT 000,006,000,000,006,000,000,003 ^�TXT 000,000,003,000,000,003,000,000 ��TXT 000,000,000,000,000,000,000,000 ��TXT 000,000,000,000,000,000,000,153 ��; ��TXT 255,192,000,129,064,000,128,064 �TXT 000,129,064,000,066,128,000,064 ,�TXT 128,000,051,000,000,012,000,000 T�TXT 055,000,000,065,128,000,066,128 |�TXT 000,129,064,000,130,192,000,133 �TXT 064,000,255,192,000,000,000,000 �TXT 000,000,000,000,000,000,000,000 �TXT 000,000,000,000,000,000,000,197 �!; " &TXT 255,192,000,255,192,000,255,192 J 0TXT 000,255,192,000,127,128,000,127 r :TXT 128,000,063,000,000,012,000,000 � DTXT 063,000,000,127,128,000,127,128 � NTXT 000,255,192,000,255,192,000,255 � XTXT 192,000,255,192,000,000,000,000 bTXT 000,000,000,000,000,000,000,000 :lTXT 000,000,000,000,000,000,000,197 @q; hvTXT 168,000,000,000,000,000,128,000 ��TXT 000,000,000,000,128,000,000,000 ��TXT 000,000,000,000,000,000,000,000 ��TXT 000,000,000,000,000,000,000,000 �TXT 000,000,000,000,000,000,000,000 0�TXT 000,000,000,000,000,000,000,000 X�TXT 000,000,000,000,000,000,000,000 ��TXT 000,000,000,000,000,000,000,197 ��; ��TXT 000,000,021,000,000,000,000,000 ��TXT 001,000,000,000,000,000,001,000 ��TXT 000,000,000,000,000,000,000,000 &�TXT 000,000,000,000,000,000,000,000 N�TXT 000,000,000,000,000,000,000,000 v�TXT 000,000,000,000,000,000,000,000 �TXT 000,000,000,000,000,000,000,000 �TXT 000,000,000,000,000,000,000,000 �; �TXT 000,000,000,000,000,000,000,000 TXT 000,000,000,000,000,000,000,000 D*TXT 000,000,000,000,000,000,000,000 l4TXT 000,000,000,000,000,000,000,000 �>TXT 000,000,000,000,000,000,000,000 �HTXT 000,000,000,000,000,000,000,000 �RTXT 128,000,000,000,000,000,128,000 \TXT 000,000,000,000,168,000,000,000 a; :fTXT 000,000,000,000,000,000,000,000 bpTXT 000,000,000,000,000,000,000,000 �zTXT 000,000,000,000,000,000,000,000 ��TXT 000,000,000,000,000,000,000,000 ��TXT 000,000,000,000,000,000,000,000 �TXT 000,000,000,000,000,000,000,000 *�TXT 000,000,001,000,000,000,000,000 R�TXT 001,000,000,000,000,000,021,000 X�; {'; MAIN �ROL ROUTINES �'JSR INIT �$'JSR HIRES� �.'�ROLOP LDA CLICK �8'BNE �ROLOP �B'�LOPB LDA CLICK �L'BEQ �LOPB �V'LDA XP �`'CMP #$58 j'BCC �� t'JMP BOX ~'�� JMP �ROLOP ?�'; THERE IS A LOT M�E � COME! e�.; WIMP ROUTINES x�.; WIMP - MOUSE ��.IRQ LDA #$00 �/STA CLICK �/LDA $C5 �/CMP #$01 �&/BNE C�CHECK �0/STA CLICK �:/C�CHECK CMP #$0C �D/BEQ LEFTK N/LKC CMP #$17 X/BEQ RIGHTK "b/RKC CMP #$32 .l/BEQ UPK @v/UPKC CMP #$37 N�/BEQ DOWNK `�/DKC LDA $DC00 k�/� #$01 w�/BEQ UPJ ��/UJC LDA $DC00 ��/� #$02 ��/BEQ DOWNJ ��/DJC LDA $DC00 ��/� #$04 ��/BEQ LEFTJ ��/LJC LDA $DC00 ��/� #$08 �0BEQ RIGHTJ 0RJC LDA $DC00 0� #$10 " 0E� #$10 /*0BEQ CJCH =40STA CLICK S>0CJCH JMP BOXFLASH fH0LEFTK JSR LEFT rR0JMP LKC �\0RIGHTK JSR RIGHT �f0JMP RKC �p0UPK JSR UP �z0JMP UPKC ��0DOWNK JSR DOWN ��0JMP DKC ��0UPJ JSR UP ��0JMP UJC ��0DOWNJ JSR DOWN �0JMP DJC �0LEFTJ JSR LEFT '�0JMP LJC <�0RIGHTJ JSR RIGHT H�0JMP RJC X�0LEFT DEC XP c�0LDA XP p�0CMP #$FF |1BNE �FF �1LDY #$00 �1STY XPB �$1�FF LDY XPB �.1BNE FIN �81CMP #$18 �B1BNE FIN �L1INC XP �V1FIN JMP �ROL �`1RIGHT INC XP j1LDA XP t1BNE �00 ~1LDY #$01 '�1STY XPB 7�1�00 LDY XPB C�1BEQ FIN P�1CMP #$58 \�1BNE FIN g�1DEC XP t�1JMP �ROL ��1UP DEC YP ��1LDA YP ��1CMP #$32 ��1BNE FIN ��1INC YP � 2JMP �ROL � 2DOWN INC YP �2LDA YP �2CMP #$F8 �(2BNE FIN �22DEC YP <2JMP �ROL F2; WIMP � PO�ER /P2�ROL LDA HOUR ?Z2BEQ NHGLASS L�3LDX #$3A Z�3STX $07F8 b�3INX p�3STX $07F9 ��3NHGLASS LDA XP ��3STA $D000 ��3STA $D002 ��3LDA YP ��3STA $D001 ��3STA $D003 ��3LDA $D010 �4� #$FC �4LSR A �4CLC �&4ADC XPB 04ASL A :4CLC D4ADC XPB )N4STA $D010 6X4LDA #$00 Db4STA $D027 Ql4LDA #$01 _v4STA $D028 m�4LDA $D015 y�4�A #$03 ��4STA $D015 ��4LDA HOUR ��4BNE QTRO ��4LDX #$38 ��4STX $07F8 ��4INX ��4STX $07F9 ��4QTRO RTS ��4; STARTUP ROUTINES �4INIT LDA #$00 �4STA $D020 $5STA $D021 /5STA XP <5STA HOUR J 5STA $D015 W*5LDA #$01 c45STA XPB p>5LDA #$80 {H5STA YP �R5HIRES� LDA #$3B �\5STA $D011 �f5LDA #$D8 �p5STA $D016 �z5LDA #$00 ��5STA $FB ��5TAY ��5LDA #$04 ��5STA $FC ��5LDA #$7E �5FLOP STA ($FB),Y �5INY ,�5BEQ FLOPINC 9�5CPY #$F8 F�5BNE FLOP R�5LDX $FC _�5CPX #$07 l�5BNE FLOP y6JSR LEFT �6SEI �6LDA #�IRQ �$6STA $0314 �.6LDA #�IRQ �86STA $0315 �B6CLI �L6LDA #$D8 �V6STA $FC �`6LDA #$02 �j6LDY #$00 t6FLOPB STA ($FB),Y ~6INY �6BNE FLOPB ,�6INC $FC 8�6LDX $FC E�6CPX #$DC S�6BNE FLOPB `�6LDA #$18 n�6STA $D018 v4:RTS �>:FLOPINC INC $FC �H:JMP FLOP �R:HIRESOFF SEI �\:LDA #$31 �f:STA $0314 �p:LDA #$EA �z:STA $0315 ��:CLI ��:LDA #$00 �:STA $D015 �:LDA #$9B �:STA $D011 )�:LDA #$C8 7�:STA $D016 ?�:RTS c0u; M�LEBROT SET PLOTTER u:uM�LE LDA #$00 �DuSTA YPIXEL �NuLDA #$03 �XuSTA $4100 �buLDA #$06 �luSTA $4102 �vuJSR EQUAL ��uMMAINL LDA #$00 ��uSTA XPIXEL ��uLDA #$01 �uSTA $4100 �uLDA #$05 !�uSTA $4102 /�uJSR EQUAL D�uMMAINLB LDA #$05 R�uSTA $4100 _�uLDA #$07 m�uSTA $4102 {�uJSR EQUAL ��uINC $4100 �vINC $4102 �vJSR EQUAL �vLDA #$00 � vSTA COLOUR �*vLOOP LDA #$07 �4vSTA $4100 �>vSTA $4101 �HvLDA #$10 RvSTA $4102 \vJSR MULTIPLY ( fvLDA #$08 6 pvSTA $4100 D zvSTA $4101 Q �vLDA #$11 _ �vSTA $4102 p �vJSR MULTIPLY } �vLDX #$10 � �vSTX $4100 � �vINX � �vSTX $4101 � �vINX � �vSTX $4102 � �vJSR ADDITI� � �vLDA $4091 � �vCMP #$04 � �vBCC FAIL � wCMP #$50 !wBCS FAIL !!wSUCPASS JMP SUCCESS 5!$wFAIL INC COLOUR D!)wLDA COLOUR S!.wCMP MAXCOL c!8wBEQ SUCPASS t!BwJSR SUBTRACT �!LwLDA #$12 �!VwSTA $4100 �!`wLDA #$05 �!jwSTA $4101 �!twLDA #$13 �!~wSTA $4102 �!�wJSR ADDITI� �!�wLDA #$07 �!�wSTA $4100 �!�wLDA #$08 "�wSTA $4101 "�wINC $4102 *"�wJSR MULTIPLY 7"�wLDA #$14 E"�wSTA $4100 R"�wLDA #$1C `"�wSTA $4101 m"�wLDA #$15 {"