Home » Personal collection » Acorn ADFS disks » Greaseweazled » dfs_box04_disk02b_eug_scripts.adf » PT4/P/bbtemp

PT4/P/bbtemp

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 » Acorn ADFS disks » Greaseweazled » dfs_box04_disk02b_eug_scripts.adf
Filename: PT4/P/bbtemp
Read OK:
File size: 1006 bytes
Load address: 0000
Exec address: FFFFFFFF
File contents
>L.

   10 MODE2:HIMEM=&2F00:PROCasschar
   20 REM Put your program code here!
   30 PROCsetpaint(3)
   40 DIMblok%(19,9)
   50 ?xoff=0:?yoff=0:FORx=0TO19:FORy=0TO9:?char=1+RND(2):?xc=x:?yc=y:CALLdisplay:NEXT:NEXT
   60 xball=37:yball=100:up=FALSE:left=FALSE
   70 xbat=9
   80 ?char=4:?xc=9:?yc=30:?xoff=0:?yoff=0:CALLdisplay:?xc=10:?char=5:CALLdisplay
   90 ?char=0:?xc=xball DIV4:?yc=yball DIV8:?xoff=xball AND3:?yoff=yball AND7:CALLdisplay
  100 REPEAT
  110 IF left THEN xnew=xball-2 ELSE xnew=xball+2
  120 IF up THEN ynew=yball-4 ELSE ynew=yball+4
  130 IF ynew<4 THEN up=FALSE
  140 IF ynew=248 THEN VDU7:REPEAT UNTIL INKEY(-99):xnew=37:ynew=100
  150 IF xnew=1 THEN left=FALSE
  160 IF xnew=75 THEN left=TRUE
  170 ?char=0:?xc=xball DIV4:?yc=yball DIV8:?xoff=xball AND3:?yoff=yball AND7:CALLdisplay
  180 xball=xnew:yball=ynew
  190 ?char=0:?xc=xball DIV4:?yc=yball DIV8:?xoff=xball AND3:?yoff=yball AND7:CALLdisplay
  200 IF yball=232 AND (xball>(xbat-2)*4) AND (xball<(xbat+2)*4) THEN up=TRUE
  210 IF yball>80 THEN GOTO 330
  220 xb%=xball DIV4:yb%=yball DIV8:PROCsetpaint(0)
  230 IF up AND yb%<>0 THEN IF blok%(xb%,yb%-1)=0THENup=FALSE:blok%(xb%,yb%-1)=1:?char=6:?xc=xb%:?yc=yb%-1:?xoff=0:?yoff=0:CALLdisplay
  240 IF up AND left AND yb%<>0 AND xb%<>0 THEN IF blok%(xb%-1,yb%-1)=0THENup=FALSE:left=FALSE:blok%(xb%-1,yb%-1)=1:?char=6:?xc=xb%-1:?yc=yb%-1:?xoff=0:?yoff=0:CALLdisplay
  250 IF up AND (NOT left) AND yb%<>0 AND xb%<19 THEN IF blok%(xb%+1,yb%-1)=0THENup=FALSE:left=TRUE:blok%(xb%+1,yb%-1)=1:?char=6:?xc=xb%+1:?yc=yb%-1:?xoff=0:?yoff=0:CALLdisplay
  260 IF NOT up AND yb%<9 THEN IF blok%(xb%,yb%+1)=0THENup=TRUE:blok%(xb%,yb%+1)=1:?char=6:?xc=xb%:?yc=yb%+1:?xoff=0:?yoff=0:CALLdisplay
  270 IF (NOT up) AND left AND xb%<>0 AND yb%<9 THEN IF blok%(xb%-1,yb%+1)=0THENup=TRUE:left=FALSE:blok%(xb%-1,yb%+1)=1:?char=6:?xc=xb%-1:?yc=yb%+1:?xoff=0:?yoff=0:CALLdisplay
  280 IF (NOT up) AND (NOT left) AND xb%<19 AND yb%<9 THEN IF blok%(xb%+1,yb%+1)=0THENup=TRUE:left=TRUE:blok%(xb%+1,yb%+1)=1:?char=6:?xc=xb%+1:?yc=yb%+1:?xoff=0:?yoff=0:CALLdisplay
  290 IF yb%>9 THEN GOTO 320
  300 IF left AND xb%<>0 THEN IF blok%(xb%-1,yb%)=0THENleft=FALSE:blok%(xb%-1,yb%)=1:?char=6:?xc=xb%-1:?yc=yb%:?xoff=0:?yoff=0:CALLdisplay
  310 IF NOT left AND xb%<19 THEN IF blok%(xb%+1,yb%)=0THENleft=TRUE:blok%(xb%+1,yb%)=1:?char=6:?xc=xb%+1:?yc=yb%:?xoff=0:?yoff=0:CALLdisplay
  320 PROCsetpaint(3)
  330 xnew=-1:IF INKEY(-98) AND xbat<>0 THEN xnew=xbat-0.5
  340 IF INKEY(-67) AND xbat<>18 THEN xnew=xbat+0.5
  350 IF xnew=-1 THEN UNTIL FALSE
  360 ?char=4:?xc=INT(xbat):?yc=30:?xoff=(xbat*4)AND2:?yoff=0:CALLdisplay:?xc=?xc+1:?char=5:CALLdisplay
  370 xbat=xnew
  380 ?char=4:?xc=INT(xbat):?xoff=(xbat*4)AND2:CALLdisplay:?xc=?xc+1:?char=5:CALLdisplay
  390 UNTIL FALSE
  400 END
  410 :
  420 DEFPROCasschar
  430 start=&C00:bitmap=&2F00:file$="B+B"
  440 FORpass=0 TO 2 STEP 2
  450 P%=start:[OPTpass
  460 .display LDAyc:AND#1:TAY:LDAlorow,Y:STA&70:LDAyc:LSR A:CLC:ADCyc:ADCyc:ADC#&30:STA&71:LDAxc:ASL A:STA&72:LDA#0:ROL A:STA&73:ASL&72:ROL&73:ASL&72:ROL&73:ASL&72:ROL&73:ASL&72:ROL&73:LDA&70:CLC:ADC&72:STA&70:LDA&71:ADC&73:STA&71
  470 LDA&70:CLC:ADCyoff:STA&70:LDA&71:ADC#0:STA&71:LDAxoff:ASL A:ASL A:ASL A:CLC:ADC&70:STA&70:LDA&71:ADC#0:STA&71
  480 LDAchar:ASL A:ASL A:ASL A:STA&72:LDA#0:ROL A:STA&73:ASL&72:ROL&73:ASL&72:ROL&73:LDA&72:CLC:ADC#(bitmap MOD 256):STA&72:LDA&73:ADC#(bitmap DIV 256):STA&73
  490 LDA#8:PHA:.col LDX#3:.row TXA:ASL A:ASL A:ASL A:TAY:LDA(&70),Y:.settype LDA(&72),Y:STA(&70),Y:DEX:BPLrow:PLA:TAX:DEX:CPX#0:BEQfindisp:TXA:PHA:INC&72:LDA&70:CLC:ADC#1:PHA:STA&70:LDA&71:ADC#0:STA&71:PLA:AND#7:BNEcol
  500 LDA&70:CLC:ADC#&78:STA&70:LDA&71:ADC#2:STA&71:JMPcol
  510 .findisp RTS
  520 .lorow EQUB0:EQUB&80:.xc EQUB0:.yc EQUB0:.xoff EQUB0:.yoff EQUB0:.char EQUB0
  530 ]:NEXT:OSCLI"LOAD "+file$+" 2F00"
  540 ENDPROC
  550 :
  560 DEFPROCsetpaint(type)
  570 IF type=0 THEN ?settype=&B1
  580 IF type=1 THEN ?settype=&11
  590 IF type=2 THEN ?settype=&31
  600 IF type=3 THEN ?settype=&51
  610 ENDPROC
>*SPOOL

00000000  3e 4c 2e 0a 0d 20 20 20  31 30 20 4d 4f 44 45 32  |>L...   10 MODE2|
00000010  3a 48 49 4d 45 4d 3d 26  32 46 30 30 3a 50 52 4f  |:HIMEM=&2F00:PRO|
00000020  43 61 73 73 63 68 61 72  0d 0a 20 20 20 32 30 20  |Casschar..   20 |
00000030  52 45 4d 20 50 75 74 20  79 6f 75 72 20 70 72 6f  |REM Put your pro|
00000040  67 72 61 6d 20 63 6f 64  65 20 68 65 72 65 21 0d  |gram code here!.|
00000050  0a 20 20 20 33 30 20 50  52 4f 43 73 65 74 70 61  |.   30 PROCsetpa|
00000060  69 6e 74 28 33 29 0d 0a  20 20 20 34 30 20 44 49  |int(3)..   40 DI|
00000070  4d 62 6c 6f 6b 25 28 31  39 2c 39 29 0d 0a 20 20  |Mblok%(19,9)..  |
00000080  20 35 30 20 3f 78 6f 66  66 3d 30 3a 3f 79 6f 66  | 50 ?xoff=0:?yof|
00000090  66 3d 30 3a 46 4f 52 78  3d 30 54 4f 31 39 3a 46  |f=0:FORx=0TO19:F|
000000a0  4f 52 79 3d 30 54 4f 39  3a 3f 63 68 61 72 3d 31  |ORy=0TO9:?char=1|
000000b0  2b 52 4e 44 28 32 29 3a  3f 78 63 3d 78 3a 3f 79  |+RND(2):?xc=x:?y|
000000c0  63 3d 79 3a 43 41 4c 4c  64 69 73 70 6c 61 79 3a  |c=y:CALLdisplay:|
000000d0  4e 45 58 54 3a 4e 45 58  54 0d 0a 20 20 20 36 30  |NEXT:NEXT..   60|
000000e0  20 78 62 61 6c 6c 3d 33  37 3a 79 62 61 6c 6c 3d  | xball=37:yball=|
000000f0  31 30 30 3a 75 70 3d 46  41 4c 53 45 3a 6c 65 66  |100:up=FALSE:lef|
00000100  74 3d 46 41 4c 53 45 0d  0a 20 20 20 37 30 20 78  |t=FALSE..   70 x|
00000110  62 61 74 3d 39 0d 0a 20  20 20 38 30 20 3f 63 68  |bat=9..   80 ?ch|
00000120  61 72 3d 34 3a 3f 78 63  3d 39 3a 3f 79 63 3d 33  |ar=4:?xc=9:?yc=3|
00000130  30 3a 3f 78 6f 66 66 3d  30 3a 3f 79 6f 66 66 3d  |0:?xoff=0:?yoff=|
00000140  30 3a 43 41 4c 4c 64 69  73 70 6c 61 79 3a 3f 78  |0:CALLdisplay:?x|
00000150  63 3d 31 30 3a 3f 63 68  61 72 3d 35 3a 43 41 4c  |c=10:?char=5:CAL|
00000160  4c 64 69 73 70 6c 61 79  0d 0a 20 20 20 39 30 20  |Ldisplay..   90 |
00000170  3f 63 68 61 72 3d 30 3a  3f 78 63 3d 78 62 61 6c  |?char=0:?xc=xbal|
00000180  6c 20 44 49 56 34 3a 3f  79 63 3d 79 62 61 6c 6c  |l DIV4:?yc=yball|
00000190  20 44 49 56 38 3a 3f 78  6f 66 66 3d 78 62 61 6c  | DIV8:?xoff=xbal|
000001a0  6c 20 41 4e 44 33 3a 3f  79 6f 66 66 3d 79 62 61  |l AND3:?yoff=yba|
000001b0  6c 6c 20 41 4e 44 37 3a  43 41 4c 4c 64 69 73 70  |ll AND7:CALLdisp|
000001c0  6c 61 79 0d 0a 20 20 31  30 30 20 52 45 50 45 41  |lay..  100 REPEA|
000001d0  54 0d 0a 20 20 31 31 30  20 49 46 20 6c 65 66 74  |T..  110 IF left|
000001e0  20 54 48 45 4e 20 78 6e  65 77 3d 78 62 61 6c 6c  | THEN xnew=xball|
000001f0  2d 32 20 45 4c 53 45 20  78 6e 65 77 3d 78 62 61  |-2 ELSE xnew=xba|
00000200  6c 6c 2b 32 0d 0a 20 20  31 32 30 20 49 46 20 75  |ll+2..  120 IF u|
00000210  70 20 54 48 45 4e 20 79  6e 65 77 3d 79 62 61 6c  |p THEN ynew=ybal|
00000220  6c 2d 34 20 45 4c 53 45  20 79 6e 65 77 3d 79 62  |l-4 ELSE ynew=yb|
00000230  61 6c 6c 2b 34 0d 0a 20  20 31 33 30 20 49 46 20  |all+4..  130 IF |
00000240  79 6e 65 77 3c 34 20 54  48 45 4e 20 75 70 3d 46  |ynew<4 THEN up=F|
00000250  41 4c 53 45 0d 0a 20 20  31 34 30 20 49 46 20 79  |ALSE..  140 IF y|
00000260  6e 65 77 3d 32 34 38 20  54 48 45 4e 20 56 44 55  |new=248 THEN VDU|
00000270  37 3a 52 45 50 45 41 54  20 55 4e 54 49 4c 20 49  |7:REPEAT UNTIL I|
00000280  4e 4b 45 59 28 2d 39 39  29 3a 78 6e 65 77 3d 33  |NKEY(-99):xnew=3|
00000290  37 3a 79 6e 65 77 3d 31  30 30 0d 0a 20 20 31 35  |7:ynew=100..  15|
000002a0  30 20 49 46 20 78 6e 65  77 3d 31 20 54 48 45 4e  |0 IF xnew=1 THEN|
000002b0  20 6c 65 66 74 3d 46 41  4c 53 45 0d 0a 20 20 31  | left=FALSE..  1|
000002c0  36 30 20 49 46 20 78 6e  65 77 3d 37 35 20 54 48  |60 IF xnew=75 TH|
000002d0  45 4e 20 6c 65 66 74 3d  54 52 55 45 0d 0a 20 20  |EN left=TRUE..  |
000002e0  31 37 30 20 3f 63 68 61  72 3d 30 3a 3f 78 63 3d  |170 ?char=0:?xc=|
000002f0  78 62 61 6c 6c 20 44 49  56 34 3a 3f 79 63 3d 79  |xball DIV4:?yc=y|
00000300  62 61 6c 6c 20 44 49 56  38 3a 3f 78 6f 66 66 3d  |ball DIV8:?xoff=|
00000310  78 62 61 6c 6c 20 41 4e  44 33 3a 3f 79 6f 66 66  |xball AND3:?yoff|
00000320  3d 79 62 61 6c 6c 20 41  4e 44 37 3a 43 41 4c 4c  |=yball AND7:CALL|
00000330  64 69 73 70 6c 61 79 0d  0a 20 20 31 38 30 20 78  |display..  180 x|
00000340  62 61 6c 6c 3d 78 6e 65  77 3a 79 62 61 6c 6c 3d  |ball=xnew:yball=|
00000350  79 6e 65 77 0d 0a 20 20  31 39 30 20 3f 63 68 61  |ynew..  190 ?cha|
00000360  72 3d 30 3a 3f 78 63 3d  78 62 61 6c 6c 20 44 49  |r=0:?xc=xball DI|
00000370  56 34 3a 3f 79 63 3d 79  62 61 6c 6c 20 44 49 56  |V4:?yc=yball DIV|
00000380  38 3a 3f 78 6f 66 66 3d  78 62 61 6c 6c 20 41 4e  |8:?xoff=xball AN|
00000390  44 33 3a 3f 79 6f 66 66  3d 79 62 61 6c 6c 20 41  |D3:?yoff=yball A|
000003a0  4e 44 37 3a 43 41 4c 4c  64 69 73 70 6c 61 79 0d  |ND7:CALLdisplay.|
000003b0  0a 20 20 32 30 30 20 49  46 20 79 62 61 6c 6c 3d  |.  200 IF yball=|
000003c0  32 33 32 20 41 4e 44 20  28 78 62 61 6c 6c 3e 28  |232 AND (xball>(|
000003d0  78 62 61 74 2d 32 29 2a  34 29 20 41 4e 44 20 28  |xbat-2)*4) AND (|
000003e0  78 62 61 6c 6c 3c 28 78  62 61 74 2b 32 29 2a 34  |xball<(xbat+2)*4|
000003f0  29 20 54 48 45 4e 20 75  70 3d 54 52 55 45 0d 0a  |) THEN up=TRUE..|
00000400  20 20 32 31 30 20 49 46  20 79 62 61 6c 6c 3e 38  |  210 IF yball>8|
00000410  30 20 54 48 45 4e 20 47  4f 54 4f 20 33 33 30 0d  |0 THEN GOTO 330.|
00000420  0a 20 20 32 32 30 20 78  62 25 3d 78 62 61 6c 6c  |.  220 xb%=xball|
00000430  20 44 49 56 34 3a 79 62  25 3d 79 62 61 6c 6c 20  | DIV4:yb%=yball |
00000440  44 49 56 38 3a 50 52 4f  43 73 65 74 70 61 69 6e  |DIV8:PROCsetpain|
00000450  74 28 30 29 0d 0a 20 20  32 33 30 20 49 46 20 75  |t(0)..  230 IF u|
00000460  70 20 41 4e 44 20 79 62  25 3c 3e 30 20 54 48 45  |p AND yb%<>0 THE|
00000470  4e 20 49 46 20 62 6c 6f  6b 25 28 78 62 25 2c 79  |N IF blok%(xb%,y|
00000480  62 25 2d 31 29 3d 30 54  48 45 4e 75 70 3d 46 41  |b%-1)=0THENup=FA|
00000490  4c 53 45 3a 62 6c 6f 6b  25 28 78 62 25 2c 79 62  |LSE:blok%(xb%,yb|
000004a0  25 2d 31 29 3d 31 3a 3f  63 68 61 72 3d 36 3a 3f  |%-1)=1:?char=6:?|
000004b0  78 63 3d 78 62 25 3a 3f  79 63 3d 79 62 25 2d 31  |xc=xb%:?yc=yb%-1|
000004c0  3a 3f 78 6f 66 66 3d 30  3a 3f 79 6f 66 66 3d 30  |:?xoff=0:?yoff=0|
000004d0  3a 43 41 4c 4c 64 69 73  70 6c 61 79 0d 0a 20 20  |:CALLdisplay..  |
000004e0  32 34 30 20 49 46 20 75  70 20 41 4e 44 20 6c 65  |240 IF up AND le|
000004f0  66 74 20 41 4e 44 20 79  62 25 3c 3e 30 20 41 4e  |ft AND yb%<>0 AN|
00000500  44 20 78 62 25 3c 3e 30  20 54 48 45 4e 20 49 46  |D xb%<>0 THEN IF|
00000510  20 62 6c 6f 6b 25 28 78  62 25 2d 31 2c 79 62 25  | blok%(xb%-1,yb%|
00000520  2d 31 29 3d 30 54 48 45  4e 75 70 3d 46 41 4c 53  |-1)=0THENup=FALS|
00000530  45 3a 6c 65 66 74 3d 46  41 4c 53 45 3a 62 6c 6f  |E:left=FALSE:blo|
00000540  6b 25 28 78 62 25 2d 31  2c 79 62 25 2d 31 29 3d  |k%(xb%-1,yb%-1)=|
00000550  31 3a 3f 63 68 61 72 3d  36 3a 3f 78 63 3d 78 62  |1:?char=6:?xc=xb|
00000560  25 2d 31 3a 3f 79 63 3d  79 62 25 2d 31 3a 3f 78  |%-1:?yc=yb%-1:?x|
00000570  6f 66 66 3d 30 3a 3f 79  6f 66 66 3d 30 3a 43 41  |off=0:?yoff=0:CA|
00000580  4c 4c 64 69 73 70 6c 61  79 0d 0a 20 20 32 35 30  |LLdisplay..  250|
00000590  20 49 46 20 75 70 20 41  4e 44 20 28 4e 4f 54 20  | IF up AND (NOT |
000005a0  6c 65 66 74 29 20 41 4e  44 20 79 62 25 3c 3e 30  |left) AND yb%<>0|
000005b0  20 41 4e 44 20 78 62 25  3c 31 39 20 54 48 45 4e  | AND xb%<19 THEN|
000005c0  20 49 46 20 62 6c 6f 6b  25 28 78 62 25 2b 31 2c  | IF blok%(xb%+1,|
000005d0  79 62 25 2d 31 29 3d 30  54 48 45 4e 75 70 3d 46  |yb%-1)=0THENup=F|
000005e0  41 4c 53 45 3a 6c 65 66  74 3d 54 52 55 45 3a 62  |ALSE:left=TRUE:b|
000005f0  6c 6f 6b 25 28 78 62 25  2b 31 2c 79 62 25 2d 31  |lok%(xb%+1,yb%-1|
00000600  29 3d 31 3a 3f 63 68 61  72 3d 36 3a 3f 78 63 3d  |)=1:?char=6:?xc=|
00000610  78 62 25 2b 31 3a 3f 79  63 3d 79 62 25 2d 31 3a  |xb%+1:?yc=yb%-1:|
00000620  3f 78 6f 66 66 3d 30 3a  3f 79 6f 66 66 3d 30 3a  |?xoff=0:?yoff=0:|
00000630  43 41 4c 4c 64 69 73 70  6c 61 79 0d 0a 20 20 32  |CALLdisplay..  2|
00000640  36 30 20 49 46 20 4e 4f  54 20 75 70 20 41 4e 44  |60 IF NOT up AND|
00000650  20 79 62 25 3c 39 20 54  48 45 4e 20 49 46 20 62  | yb%<9 THEN IF b|
00000660  6c 6f 6b 25 28 78 62 25  2c 79 62 25 2b 31 29 3d  |lok%(xb%,yb%+1)=|
00000670  30 54 48 45 4e 75 70 3d  54 52 55 45 3a 62 6c 6f  |0THENup=TRUE:blo|
00000680  6b 25 28 78 62 25 2c 79  62 25 2b 31 29 3d 31 3a  |k%(xb%,yb%+1)=1:|
00000690  3f 63 68 61 72 3d 36 3a  3f 78 63 3d 78 62 25 3a  |?char=6:?xc=xb%:|
000006a0  3f 79 63 3d 79 62 25 2b  31 3a 3f 78 6f 66 66 3d  |?yc=yb%+1:?xoff=|
000006b0  30 3a 3f 79 6f 66 66 3d  30 3a 43 41 4c 4c 64 69  |0:?yoff=0:CALLdi|
000006c0  73 70 6c 61 79 0d 0a 20  20 32 37 30 20 49 46 20  |splay..  270 IF |
000006d0  28 4e 4f 54 20 75 70 29  20 41 4e 44 20 6c 65 66  |(NOT up) AND lef|
000006e0  74 20 41 4e 44 20 78 62  25 3c 3e 30 20 41 4e 44  |t AND xb%<>0 AND|
000006f0  20 79 62 25 3c 39 20 54  48 45 4e 20 49 46 20 62  | yb%<9 THEN IF b|
00000700  6c 6f 6b 25 28 78 62 25  2d 31 2c 79 62 25 2b 31  |lok%(xb%-1,yb%+1|
00000710  29 3d 30 54 48 45 4e 75  70 3d 54 52 55 45 3a 6c  |)=0THENup=TRUE:l|
00000720  65 66 74 3d 46 41 4c 53  45 3a 62 6c 6f 6b 25 28  |eft=FALSE:blok%(|
00000730  78 62 25 2d 31 2c 79 62  25 2b 31 29 3d 31 3a 3f  |xb%-1,yb%+1)=1:?|
00000740  63 68 61 72 3d 36 3a 3f  78 63 3d 78 62 25 2d 31  |char=6:?xc=xb%-1|
00000750  3a 3f 79 63 3d 79 62 25  2b 31 3a 3f 78 6f 66 66  |:?yc=yb%+1:?xoff|
00000760  3d 30 3a 3f 79 6f 66 66  3d 30 3a 43 41 4c 4c 64  |=0:?yoff=0:CALLd|
00000770  69 73 70 6c 61 79 0d 0a  20 20 32 38 30 20 49 46  |isplay..  280 IF|
00000780  20 28 4e 4f 54 20 75 70  29 20 41 4e 44 20 28 4e  | (NOT up) AND (N|
00000790  4f 54 20 6c 65 66 74 29  20 41 4e 44 20 78 62 25  |OT left) AND xb%|
000007a0  3c 31 39 20 41 4e 44 20  79 62 25 3c 39 20 54 48  |<19 AND yb%<9 TH|
000007b0  45 4e 20 49 46 20 62 6c  6f 6b 25 28 78 62 25 2b  |EN IF blok%(xb%+|
000007c0  31 2c 79 62 25 2b 31 29  3d 30 54 48 45 4e 75 70  |1,yb%+1)=0THENup|
000007d0  3d 54 52 55 45 3a 6c 65  66 74 3d 54 52 55 45 3a  |=TRUE:left=TRUE:|
000007e0  62 6c 6f 6b 25 28 78 62  25 2b 31 2c 79 62 25 2b  |blok%(xb%+1,yb%+|
000007f0  31 29 3d 31 3a 3f 63 68  61 72 3d 36 3a 3f 78 63  |1)=1:?char=6:?xc|
00000800  3d 78 62 25 2b 31 3a 3f  79 63 3d 79 62 25 2b 31  |=xb%+1:?yc=yb%+1|
00000810  3a 3f 78 6f 66 66 3d 30  3a 3f 79 6f 66 66 3d 30  |:?xoff=0:?yoff=0|
00000820  3a 43 41 4c 4c 64 69 73  70 6c 61 79 0d 0a 20 20  |:CALLdisplay..  |
00000830  32 39 30 20 49 46 20 79  62 25 3e 39 20 54 48 45  |290 IF yb%>9 THE|
00000840  4e 20 47 4f 54 4f 20 33  32 30 0d 0a 20 20 33 30  |N GOTO 320..  30|
00000850  30 20 49 46 20 6c 65 66  74 20 41 4e 44 20 78 62  |0 IF left AND xb|
00000860  25 3c 3e 30 20 54 48 45  4e 20 49 46 20 62 6c 6f  |%<>0 THEN IF blo|
00000870  6b 25 28 78 62 25 2d 31  2c 79 62 25 29 3d 30 54  |k%(xb%-1,yb%)=0T|
00000880  48 45 4e 6c 65 66 74 3d  46 41 4c 53 45 3a 62 6c  |HENleft=FALSE:bl|
00000890  6f 6b 25 28 78 62 25 2d  31 2c 79 62 25 29 3d 31  |ok%(xb%-1,yb%)=1|
000008a0  3a 3f 63 68 61 72 3d 36  3a 3f 78 63 3d 78 62 25  |:?char=6:?xc=xb%|
000008b0  2d 31 3a 3f 79 63 3d 79  62 25 3a 3f 78 6f 66 66  |-1:?yc=yb%:?xoff|
000008c0  3d 30 3a 3f 79 6f 66 66  3d 30 3a 43 41 4c 4c 64  |=0:?yoff=0:CALLd|
000008d0  69 73 70 6c 61 79 0d 0a  20 20 33 31 30 20 49 46  |isplay..  310 IF|
000008e0  20 4e 4f 54 20 6c 65 66  74 20 41 4e 44 20 78 62  | NOT left AND xb|
000008f0  25 3c 31 39 20 54 48 45  4e 20 49 46 20 62 6c 6f  |%<19 THEN IF blo|
00000900  6b 25 28 78 62 25 2b 31  2c 79 62 25 29 3d 30 54  |k%(xb%+1,yb%)=0T|
00000910  48 45 4e 6c 65 66 74 3d  54 52 55 45 3a 62 6c 6f  |HENleft=TRUE:blo|
00000920  6b 25 28 78 62 25 2b 31  2c 79 62 25 29 3d 31 3a  |k%(xb%+1,yb%)=1:|
00000930  3f 63 68 61 72 3d 36 3a  3f 78 63 3d 78 62 25 2b  |?char=6:?xc=xb%+|
00000940  31 3a 3f 79 63 3d 79 62  25 3a 3f 78 6f 66 66 3d  |1:?yc=yb%:?xoff=|
00000950  30 3a 3f 79 6f 66 66 3d  30 3a 43 41 4c 4c 64 69  |0:?yoff=0:CALLdi|
00000960  73 70 6c 61 79 0d 0a 20  20 33 32 30 20 50 52 4f  |splay..  320 PRO|
00000970  43 73 65 74 70 61 69 6e  74 28 33 29 0d 0a 20 20  |Csetpaint(3)..  |
00000980  33 33 30 20 78 6e 65 77  3d 2d 31 3a 49 46 20 49  |330 xnew=-1:IF I|
00000990  4e 4b 45 59 28 2d 39 38  29 20 41 4e 44 20 78 62  |NKEY(-98) AND xb|
000009a0  61 74 3c 3e 30 20 54 48  45 4e 20 78 6e 65 77 3d  |at<>0 THEN xnew=|
000009b0  78 62 61 74 2d 30 2e 35  0d 0a 20 20 33 34 30 20  |xbat-0.5..  340 |
000009c0  49 46 20 49 4e 4b 45 59  28 2d 36 37 29 20 41 4e  |IF INKEY(-67) AN|
000009d0  44 20 78 62 61 74 3c 3e  31 38 20 54 48 45 4e 20  |D xbat<>18 THEN |
000009e0  78 6e 65 77 3d 78 62 61  74 2b 30 2e 35 0d 0a 20  |xnew=xbat+0.5.. |
000009f0  20 33 35 30 20 49 46 20  78 6e 65 77 3d 2d 31 20  | 350 IF xnew=-1 |
00000a00  54 48 45 4e 20 55 4e 54  49 4c 20 46 41 4c 53 45  |THEN UNTIL FALSE|
00000a10  0d 0a 20 20 33 36 30 20  3f 63 68 61 72 3d 34 3a  |..  360 ?char=4:|
00000a20  3f 78 63 3d 49 4e 54 28  78 62 61 74 29 3a 3f 79  |?xc=INT(xbat):?y|
00000a30  63 3d 33 30 3a 3f 78 6f  66 66 3d 28 78 62 61 74  |c=30:?xoff=(xbat|
00000a40  2a 34 29 41 4e 44 32 3a  3f 79 6f 66 66 3d 30 3a  |*4)AND2:?yoff=0:|
00000a50  43 41 4c 4c 64 69 73 70  6c 61 79 3a 3f 78 63 3d  |CALLdisplay:?xc=|
00000a60  3f 78 63 2b 31 3a 3f 63  68 61 72 3d 35 3a 43 41  |?xc+1:?char=5:CA|
00000a70  4c 4c 64 69 73 70 6c 61  79 0d 0a 20 20 33 37 30  |LLdisplay..  370|
00000a80  20 78 62 61 74 3d 78 6e  65 77 0d 0a 20 20 33 38  | xbat=xnew..  38|
00000a90  30 20 3f 63 68 61 72 3d  34 3a 3f 78 63 3d 49 4e  |0 ?char=4:?xc=IN|
00000aa0  54 28 78 62 61 74 29 3a  3f 78 6f 66 66 3d 28 78  |T(xbat):?xoff=(x|
00000ab0  62 61 74 2a 34 29 41 4e  44 32 3a 43 41 4c 4c 64  |bat*4)AND2:CALLd|
00000ac0  69 73 70 6c 61 79 3a 3f  78 63 3d 3f 78 63 2b 31  |isplay:?xc=?xc+1|
00000ad0  3a 3f 63 68 61 72 3d 35  3a 43 41 4c 4c 64 69 73  |:?char=5:CALLdis|
00000ae0  70 6c 61 79 0d 0a 20 20  33 39 30 20 55 4e 54 49  |play..  390 UNTI|
00000af0  4c 20 46 41 4c 53 45 0d  0a 20 20 34 30 30 20 45  |L FALSE..  400 E|
00000b00  4e 44 0d 0a 20 20 34 31  30 20 3a 0d 0a 20 20 34  |ND..  410 :..  4|
00000b10  32 30 20 44 45 46 50 52  4f 43 61 73 73 63 68 61  |20 DEFPROCasscha|
00000b20  72 0d 0a 20 20 34 33 30  20 73 74 61 72 74 3d 26  |r..  430 start=&|
00000b30  43 30 30 3a 62 69 74 6d  61 70 3d 26 32 46 30 30  |C00:bitmap=&2F00|
00000b40  3a 66 69 6c 65 24 3d 22  42 2b 42 22 0d 0a 20 20  |:file$="B+B"..  |
00000b50  34 34 30 20 46 4f 52 70  61 73 73 3d 30 20 54 4f  |440 FORpass=0 TO|
00000b60  20 32 20 53 54 45 50 20  32 0d 0a 20 20 34 35 30  | 2 STEP 2..  450|
00000b70  20 50 25 3d 73 74 61 72  74 3a 5b 4f 50 54 70 61  | P%=start:[OPTpa|
00000b80  73 73 0d 0a 20 20 34 36  30 20 2e 64 69 73 70 6c  |ss..  460 .displ|
00000b90  61 79 20 4c 44 41 79 63  3a 41 4e 44 23 31 3a 54  |ay LDAyc:AND#1:T|
00000ba0  41 59 3a 4c 44 41 6c 6f  72 6f 77 2c 59 3a 53 54  |AY:LDAlorow,Y:ST|
00000bb0  41 26 37 30 3a 4c 44 41  79 63 3a 4c 53 52 20 41  |A&70:LDAyc:LSR A|
00000bc0  3a 43 4c 43 3a 41 44 43  79 63 3a 41 44 43 79 63  |:CLC:ADCyc:ADCyc|
00000bd0  3a 41 44 43 23 26 33 30  3a 53 54 41 26 37 31 3a  |:ADC#&30:STA&71:|
00000be0  4c 44 41 78 63 3a 41 53  4c 20 41 3a 53 54 41 26  |LDAxc:ASL A:STA&|
00000bf0  37 32 3a 4c 44 41 23 30  3a 52 4f 4c 20 41 3a 53  |72:LDA#0:ROL A:S|
00000c00  54 41 26 37 33 3a 41 53  4c 26 37 32 3a 52 4f 4c  |TA&73:ASL&72:ROL|
00000c10  26 37 33 3a 41 53 4c 26  37 32 3a 52 4f 4c 26 37  |&73:ASL&72:ROL&7|
00000c20  33 3a 41 53 4c 26 37 32  3a 52 4f 4c 26 37 33 3a  |3:ASL&72:ROL&73:|
00000c30  41 53 4c 26 37 32 3a 52  4f 4c 26 37 33 3a 4c 44  |ASL&72:ROL&73:LD|
00000c40  41 26 37 30 3a 43 4c 43  3a 41 44 43 26 37 32 3a  |A&70:CLC:ADC&72:|
00000c50  53 54 41 26 37 30 3a 4c  44 41 26 37 31 3a 41 44  |STA&70:LDA&71:AD|
00000c60  43 26 37 33 3a 53 54 41  26 37 31 0d 0a 20 20 34  |C&73:STA&71..  4|
00000c70  37 30 20 4c 44 41 26 37  30 3a 43 4c 43 3a 41 44  |70 LDA&70:CLC:AD|
00000c80  43 79 6f 66 66 3a 53 54  41 26 37 30 3a 4c 44 41  |Cyoff:STA&70:LDA|
00000c90  26 37 31 3a 41 44 43 23  30 3a 53 54 41 26 37 31  |&71:ADC#0:STA&71|
00000ca0  3a 4c 44 41 78 6f 66 66  3a 41 53 4c 20 41 3a 41  |:LDAxoff:ASL A:A|
00000cb0  53 4c 20 41 3a 41 53 4c  20 41 3a 43 4c 43 3a 41  |SL A:ASL A:CLC:A|
00000cc0  44 43 26 37 30 3a 53 54  41 26 37 30 3a 4c 44 41  |DC&70:STA&70:LDA|
00000cd0  26 37 31 3a 41 44 43 23  30 3a 53 54 41 26 37 31  |&71:ADC#0:STA&71|
00000ce0  0d 0a 20 20 34 38 30 20  4c 44 41 63 68 61 72 3a  |..  480 LDAchar:|
00000cf0  41 53 4c 20 41 3a 41 53  4c 20 41 3a 41 53 4c 20  |ASL A:ASL A:ASL |
00000d00  41 3a 53 54 41 26 37 32  3a 4c 44 41 23 30 3a 52  |A:STA&72:LDA#0:R|
00000d10  4f 4c 20 41 3a 53 54 41  26 37 33 3a 41 53 4c 26  |OL A:STA&73:ASL&|
00000d20  37 32 3a 52 4f 4c 26 37  33 3a 41 53 4c 26 37 32  |72:ROL&73:ASL&72|
00000d30  3a 52 4f 4c 26 37 33 3a  4c 44 41 26 37 32 3a 43  |:ROL&73:LDA&72:C|
00000d40  4c 43 3a 41 44 43 23 28  62 69 74 6d 61 70 20 4d  |LC:ADC#(bitmap M|
00000d50  4f 44 20 32 35 36 29 3a  53 54 41 26 37 32 3a 4c  |OD 256):STA&72:L|
00000d60  44 41 26 37 33 3a 41 44  43 23 28 62 69 74 6d 61  |DA&73:ADC#(bitma|
00000d70  70 20 44 49 56 20 32 35  36 29 3a 53 54 41 26 37  |p DIV 256):STA&7|
00000d80  33 0d 0a 20 20 34 39 30  20 4c 44 41 23 38 3a 50  |3..  490 LDA#8:P|
00000d90  48 41 3a 2e 63 6f 6c 20  4c 44 58 23 33 3a 2e 72  |HA:.col LDX#3:.r|
00000da0  6f 77 20 54 58 41 3a 41  53 4c 20 41 3a 41 53 4c  |ow TXA:ASL A:ASL|
00000db0  20 41 3a 41 53 4c 20 41  3a 54 41 59 3a 4c 44 41  | A:ASL A:TAY:LDA|
00000dc0  28 26 37 30 29 2c 59 3a  2e 73 65 74 74 79 70 65  |(&70),Y:.settype|
00000dd0  20 4c 44 41 28 26 37 32  29 2c 59 3a 53 54 41 28  | LDA(&72),Y:STA(|
00000de0  26 37 30 29 2c 59 3a 44  45 58 3a 42 50 4c 72 6f  |&70),Y:DEX:BPLro|
00000df0  77 3a 50 4c 41 3a 54 41  58 3a 44 45 58 3a 43 50  |w:PLA:TAX:DEX:CP|
00000e00  58 23 30 3a 42 45 51 66  69 6e 64 69 73 70 3a 54  |X#0:BEQfindisp:T|
00000e10  58 41 3a 50 48 41 3a 49  4e 43 26 37 32 3a 4c 44  |XA:PHA:INC&72:LD|
00000e20  41 26 37 30 3a 43 4c 43  3a 41 44 43 23 31 3a 50  |A&70:CLC:ADC#1:P|
00000e30  48 41 3a 53 54 41 26 37  30 3a 4c 44 41 26 37 31  |HA:STA&70:LDA&71|
00000e40  3a 41 44 43 23 30 3a 53  54 41 26 37 31 3a 50 4c  |:ADC#0:STA&71:PL|
00000e50  41 3a 41 4e 44 23 37 3a  42 4e 45 63 6f 6c 0d 0a  |A:AND#7:BNEcol..|
00000e60  20 20 35 30 30 20 4c 44  41 26 37 30 3a 43 4c 43  |  500 LDA&70:CLC|
00000e70  3a 41 44 43 23 26 37 38  3a 53 54 41 26 37 30 3a  |:ADC#&78:STA&70:|
00000e80  4c 44 41 26 37 31 3a 41  44 43 23 32 3a 53 54 41  |LDA&71:ADC#2:STA|
00000e90  26 37 31 3a 4a 4d 50 63  6f 6c 0d 0a 20 20 35 31  |&71:JMPcol..  51|
00000ea0  30 20 2e 66 69 6e 64 69  73 70 20 52 54 53 0d 0a  |0 .findisp RTS..|
00000eb0  20 20 35 32 30 20 2e 6c  6f 72 6f 77 20 45 51 55  |  520 .lorow EQU|
00000ec0  42 30 3a 45 51 55 42 26  38 30 3a 2e 78 63 20 45  |B0:EQUB&80:.xc E|
00000ed0  51 55 42 30 3a 2e 79 63  20 45 51 55 42 30 3a 2e  |QUB0:.yc EQUB0:.|
00000ee0  78 6f 66 66 20 45 51 55  42 30 3a 2e 79 6f 66 66  |xoff EQUB0:.yoff|
00000ef0  20 45 51 55 42 30 3a 2e  63 68 61 72 20 45 51 55  | EQUB0:.char EQU|
00000f00  42 30 0d 0a 20 20 35 33  30 20 5d 3a 4e 45 58 54  |B0..  530 ]:NEXT|
00000f10  3a 4f 53 43 4c 49 22 4c  4f 41 44 20 22 2b 66 69  |:OSCLI"LOAD "+fi|
00000f20  6c 65 24 2b 22 20 32 46  30 30 22 0d 0a 20 20 35  |le$+" 2F00"..  5|
00000f30  34 30 20 45 4e 44 50 52  4f 43 0d 0a 20 20 35 35  |40 ENDPROC..  55|
00000f40  30 20 3a 0d 0a 20 20 35  36 30 20 44 45 46 50 52  |0 :..  560 DEFPR|
00000f50  4f 43 73 65 74 70 61 69  6e 74 28 74 79 70 65 29  |OCsetpaint(type)|
00000f60  0d 0a 20 20 35 37 30 20  49 46 20 74 79 70 65 3d  |..  570 IF type=|
00000f70  30 20 54 48 45 4e 20 3f  73 65 74 74 79 70 65 3d  |0 THEN ?settype=|
00000f80  26 42 31 0d 0a 20 20 35  38 30 20 49 46 20 74 79  |&B1..  580 IF ty|
00000f90  70 65 3d 31 20 54 48 45  4e 20 3f 73 65 74 74 79  |pe=1 THEN ?setty|
00000fa0  70 65 3d 26 31 31 0d 0a  20 20 35 39 30 20 49 46  |pe=&11..  590 IF|
00000fb0  20 74 79 70 65 3d 32 20  54 48 45 4e 20 3f 73 65  | type=2 THEN ?se|
00000fc0  74 74 79 70 65 3d 26 33  31 0d 0a 20 20 36 30 30  |ttype=&31..  600|
00000fd0  20 49 46 20 74 79 70 65  3d 33 20 54 48 45 4e 20  | IF type=3 THEN |
00000fe0  3f 73 65 74 74 79 70 65  3d 26 35 31 0d 0a 20 20  |?settype=&51..  |
00000ff0  36 31 30 20 45 4e 44 50  52 4f 43 0d 0a 3e 2a 53  |610 ENDPROC..>*S|
00001000  50 4f 4f 4c 0a 0d                                 |POOL..|
00001006
PT4/P/bbtemp.m0
PT4/P/bbtemp.m1
PT4/P/bbtemp.m2
PT4/P/bbtemp.m4
PT4/P/bbtemp.m5