home *** CD-ROM | disk | FTP | other *** search
- 90 remopen15,8,15,"s0:mist.o":close15
- 100 open2,8,1,"0:mist.o,p,w"
- 110 sys700
- 120 .opt o2
- 130 ;
- 140 maxlen = 16
- 150 random = $f7
- 160 step = random+2
- 170 count = step+1
- 180 dest = $fb
- 190 src = dest+2
- 200 chrget = $73
- 210 ;
- 220 prnerror = $a437
- 230 getcomma = $aefd
- 240 setfls = $ffba
- 250 setnam = $ffbd
- 260 load = $ffd5
- 270 colormem = $0400
- 280 yscroll = $d011
- 290 vicmem = $d018
- 300 loadaddr = $4000
- 310 ;
- 320 jmp past ;
- 330 jmp pastload ;
- 340 ;
- 350 ufc .byte 6
- 360 ubc .byte 1
- 370 ;
- 380 ;
- 390 past jsr getcomma ;
- 400 sta sname ; save 1st char of
- 410 ; string name
- 420 ;
- 430 jsr chrget ; fetch next char
- 440 bne bd1 ;
- 450 ldx #11 ; print 'syntax error'
- 460 jmp prnerror ;
- 470 ;
- 480 bd1 cmp #"$" ;
- 490 bne bd2 ;
- 500 lda #$80 ;
- 510 .byte $2c
- 520 bd2 ora #$80 ;
- 530 sta sname+1 ;
- 540 ;
- 550 pacify jsr chrget ;
- 560 beq bd3 ;
- 570 cmp #":" ;
- 580 bne pacify ;
- 590 ;
- 600 bd3 lda $2d ;
- 610 sta src ;
- 620 lda $2e ;
- 630 sta src+1 ;
- 640 ;
- 650 mainfind ldy #0 ;
- 660 lda src ;
- 670 cmp $2f ;
- 680 bne bd4 ;
- 690 lda src+1 ;
- 700 cmp $30 ;
- 710 bne bd4 ;
- 720 ldx #27 ; print 'undefined'
- 730 jmp prnerror ;
- 740 ;
- 750 bd4 lda (src),y ; search for
- 760 cmp sname ; string name
- 770 bne bd6 ;
- 780 iny ;
- 790 lda (src),y ;
- 800 cmp sname+1 ;
- 810 bne bd6 ;
- 820 iny ; f o u n d !
- 830 lda (src),y ; fetch string length
- 840 cmp #maxlen+1 ; "greater than 16?
- 850 bcc bd5 ;
- 860 ldx #23 ; yes, [153] [171]
- 870 jmp prnerr[176] ; 'string [164]o l[145]g'
- 880 ;
- 890 bd5 sta [195]gth ;
- 900 iny ;
- 910 lda (src),y ;
- 920 sta po[181]er ;
- 930 iny ;
- 940 lda (src),y ;
- 950 sta po[181]er[170]1 ;
- 960 bne clearsrc ;
- 970 ;
- 980 bd6 clc ; add 7 [164] string pntr.
- 990 lda src ;
- 1000 adc #7 ;
- 1010 sta src ;
- 1020 bcc mainfind ;
- 1030 inc src[170]1 ;
- 1040 bne mainfind ;
- 1050 ;
- 1060 ; [128] of string h[175]ling
- 1070 ;
- 1080 clearsrc lda #[177][147]addr ; clear
- 1090 sta dest[170]1 ; 8k at [147] address
- 1100 ldx #32 ;
- 1110 lda #0 ;
- 1120 sta dest ;
- 1130 tay ;
- 1140 ;
- 1150 cloop1 sta (dest),y ;
- 1160 iny ;
- 1170 bne cloop1 ;
- 1180 inc dest[170]1 ;
- 1190 dex ;
- 1200 bne cloop1 ;
- 1210 ;
- 1220 lda po[181]er ;
- 1230 sta src ;
- 1240 lda po[181]er[170]1 ;
- 1250 sta src[170]1 ;
- 1260 ;
- 1270 ldy #0 ; check [129] doodle! [129]mat
- 1280 lda (src),y ;
- 1290 cmp #"d" ;
- 1300 bne [168]ddl ;
- 1310 iny ;
- 1320 lda (src),y ;
- 1330 cmp #"d" ;
- 1340 bne [168]ddl ;
- 1350 lda #$ff ;
- 1360 .byte $2c
- 1370 [168]ddl lda #0 ;
- 1380 sta ddlflag ;
- 1390 ;
- 1400 lda #8 ; [147] hi[171]res screen image
- 1410 tax ;
- 1420 ldy #0 ;
- 1430 jsr setfls ;
- 1440 lda [195]gth ; fi[195]ame [195]gth
- 1450 ldx po[181]er ;
- 1460 ldy po[181]er[170]1 ;
- 1470 jsr setnam ;
- 1480 lda #0 ;
- 1490 tax ;
- 1500 bit ddlflag ;
- 1510 bpl n[176]m[147] ;
- 1520 ldy #[177]([147]addr[171]$400)
- 1530 .byte $2c
- 1540 n[176]m[147] ldy #[177][147]addr
- 1550 ;
- 1560 jsr [147] ;
- 1570 ;
- 1580 bit ddlflag ;
- 1590 bmi ddlcol[176] ;
- 1600 ;
- 1610 lda ubc ; fetch col[176] byte
- 1620 [175] #15 ;
- 1630 sta ubc ;
- 1640 lda ufc ;
- 1650 asl a ;
- 1660 asl a ;
- 1670 asl a ;
- 1680 asl a ;
- 1690 [176]a ubc ;
- 1700 ;
- 1710 ldx #250
- 1720 initcolr sta col[176]mem[171]1,x ;
- 1730 sta col[176]mem[170]249,x ;
- 1740 sta col[176]mem[170]499,x ;
- 1750 sta col[176]mem[170]749,x ;
- 1760 dex ;
- 1770 bne initcolr ;
- 1780 beq past[147] ;
- 1790 ;
- 1800 ddlcol[176] ldx #4 ;
- 1810 ldy #0 ;
- 1820 sty src ;
- 1830 sty dest ;
- 1840 lda #[177]col[176]mem ;
- 1850 sta dest[170]1 ;
- 1860 lda #[177]([147]addr[171]$400) ;
- 1870 sta src[170]1 ;
- 1880 ;
- 1890 ddlloop lda (src),y ;
- 1900 sta (dest),y ;
- 1910 iny ;
- 1920 bne ddlloop ;
- 1930 inc src[170]1 ;
- 1940 inc dest[170]1 ;
- 1950 dex ;
- 1960 bne ddlloop
- 1970 ;
- 1980 past[147] bit yscroll ;
- 1990 bpl past[147] ;
- 2000 ;
- 2010 lda #$20 ; clear screen
- 2020 sta dest[170]1 ;
- 2030 tax ;
- 2040 lda #0 ;
- 2050 sta dest ;
- 2060 tay ;
- 2070 cloop2 sta (dest),y ;
- 2080 iny ;
- 2090 bne cloop2 ;
- 2100 inc dest[170]1 ;
- 2110 dex ;
- 2120 bne cloop2 ;
- 2130 ;
- 2140 lda yscroll ; activate hi[171]res
- 2150 [176]a #%00100000 ;
- 2160 sta yscroll ;
- 2170 lda #$18 ;
- 2180 sta vicmem ;
- 2190 ;
- 2200 ; init r[175]om [197]ue
- 2210 ;
- 2220 lda #$ab ;
- 2230 sta r[175]om ;
- 2240 lda #$cd ;
- 2250 sta r[175]om[170]1 ;
- 2260 ;
- 2270 lda #6 ;
- 2280 sta [169] ;
- 2290 ;
- 2300 ;
- 2310 mainmist ldx [169] ;
- 2320 lda bounds,x ;
- 2330 ldy offsets,x ;
- 2340 tax ;
- 2350 dex ;
- 2360 lloop1 lda mask[131],y ;
- 2370 sta temp,x ;
- 2380 dey ;
- 2390 dex ;
- 2400 bpl lloop1 ;
- 2410 ;
- 2420 ldy #0 ; init screen po[181]ers
- 2430 sty dest ;
- 2440 sty src ;
- 2450 lda #$20 ;
- 2460 sta dest[170]1 ;
- 2470 sta count ;
- 2480 asl a ;
- 2490 sta src[170]1 ;
- 2500 ;
- 2510 mist1 lda r[175]om ; calc r[175]om #
- 2520 rol r[175]om ;
- 2530 e[176] r[175]om ;
- 2540 r[176] r[175]om ;
- 2550 inc r[175]om[170]1 ;
- 2560 adc r[175]om[170]1 ;
- 2570 bvc ign[176]e ;
- 2580 inc r[175]om[170]1 ;
- 2590 ign[176]e sta r[175]om ;
- 2600 ;
- 2610 ldx [169] ;
- 2620 [175] masks,x ;
- 2630 cmp bounds,x ;
- 2640 bcs mist1 ;
- 2650 tax ;
- 2660 lda temp,x ;
- 2670 [175] (src),y ;
- 2680 [176]a (dest),y ;
- 2690 sta (dest),y ;
- 2700 iny ;
- 2710 bne mist1 ;
- 2720 ;
- 2730 inc dest[170]1 ;
- 2740 inc src[170]1 ;
- 2750 dec count ;
- 2760 bne mist1 ;
- 2770 ;
- 2780 dec [169] ;
- 2790 bmi exit ;
- 2800 jmp mainmist ;
- 2810 ;
- 2820 exit lda #$20 ;
- 2830 sta dest[170]1 ;
- 2840 tax ;
- 2850 asl a ;
- 2860 sta src[170]1
- 2870 ldy #0
- 2880 sty dest
- 2890 sty src
- 2900 [128]loop lda (src),y
- 2910 sta (dest),y
- 2920 iny
- 2930 bne [128]loop
- 2940 inc dest[170]1
- 2950 inc src[170]1
- 2960 dex
- 2970 bne [128]loop
- 2980 rts
- 2990 ;
- 3000 mask[131] = *
- 3010 ;
- 3020 .byte254,253,251,247,239,223,191,127
- 3030 .byte252,250,249,246,245,243,238,237
- 3040 .byte235,231,222,221,219,215,207,190
- 3050 .byte189,187,183,175,159,126,125,123
- 3060 .byte119,111,95,63,248,244,242,241
- 3070 .byte236,234,233,230,229,227,220,218
- 3080 .byte217,214,213,211,206,205,203,199
- 3090 .byte188,186,185,182,181,179,174,173
- 3100 .byte171,167,158,157,155,151,143,124
- 3110 .byte122,121,118,117,115,110,109,107
- 3120 .byte103,94,93,91,87,79,62,61
- 3130 .byte59,55,47,31,240,232,228,226
- 3140 .byte225,216,212,210,209,204,202,201
- 3150 .byte198,197,195,184,180,178,177,172
- 3160 .byte170,169,166,165,163,156,154,153
- 3170 .byte150,149,147,142,141,139,135,120
- 3180 .byte116,114,113,108,106,105,102,101
- 3190 .byte99,92,90,89,86,85,83,78
- 3200 .byte77,75,71,60,58,57,54,53
- 3210 .byte51,46,45,43,39,30,29,27
- 3220 .byte23,15,224,208,200,196,194,193
- 3230 .byte176,168,164,162,161,152,148,146
- 3240 .byte145,140,138,137,134,133,131,112
- 3250 .byte104,100,98,97,88,84,82,81
- 3260 .byte76,74,73,70,69,67,56,52
- 3270 .byte50,49,44,42,41,38,37,35
- 3280 .byte28,26,25,22,21,19,14,13
- 3290 .byte11,7,192,160,144,136,132,130
- 3300 .byte129,96,80,72,68,66,65,48
- 3310 .byte40,36,34,33,24,20,18,17
- 3320 .byte12,10,9,6,5,3,128,64
- 3330 .byte32,16,8,4,2,1
- 3340 ;
- 3350 bounds .byte 8,28,56,70,56,28,8
- 3360 offsets .byte 7,35,91,161,217
- 3370 .byte 245,253
- 3380 masks .byte 7,31,63,127,63,31,7
- 3390 ;
- 3400 [195]gth [172][178][172][170]1
- 3410 sname [172][178][172][170]2
- 3420 po[181]er [172][178][172][170]2
- 3430 ddlflag [172][178][172][170]1
- 3440 ;
- 3450 temp [178] [172]
-