_________________________________________________________________________ Title: Mines 97 Author: Oscar Garay Size: 2920 bytes + Mat Y[1x55] + Mat Z[9x17] Model: 9700 Description: Mines game (with filling function) _________________________________________________________________________ Command translation: -> Single arrow (located on the keyboard) => Double arrow (press: [shift] [prgm] [f1] [f1]) _ Display, -Disp- (press: [shift] [prgm] [f4]) <> Not equal (A <> B) / Division _________________________________________________________________________ Program : (Needs Mat Y[1x55] and Mat Z[9x17]) 'Mines 97 ' ; 3 spaces Mcl "NUMBER OF MINES (1-30) "?->N ; 6 spaces N>30=>30->N 105-N->R 0Mat Y->Mat Y 0Mat Z->Mat Z N->C Lbl 4 Int (7Ran#)+2->A Int (15Ran#)+2->B Mat Z[A,B]>1=>Goto 4 100(8B-12)+8(9-A)-1->Mat Y[1,C] Mat Y[1,C]->Mat Z[A,B] Mat Z[A-1,B]->V V<8=>Isz V V->Mat Z[A-1,B] Mat Z[A-1,B+1]->V V<8=>Isz V V->Mat Z[A-1,B+1] Mat Z[A,B+1]->V V<8=>Isz V V->Mat Z[A,B+1] Mat Z[A+1,B+1]->V V<8=>Isz V V->Mat Z[A+1,B+1] Mat Z[A+1,B]->V V<8=>Isz V V->Mat Z[A+1,B] Mat Z[A+1,B-1]->V V<8=>Isz V V->Mat Z[A+1,B-1] Mat Z[A,B-1]->V V<8=>Isz V V->Mat Z[A,B-1] Mat Z[A-1,B-1]->V V<8=>Isz V V->Mat Z[A-1,B-1] Dsz C:Goto 4 17->C Lbl M 9->Mat Z[1,C] 9->Mat Z[9,C] Dsz C:Goto M 9->C Lbl N 9->Mat Z[C,1] 9->Mat Z[C,17] Dsz C:Goto N Range 1,127,0,1,63,0 Lbl 1 Isz C Plot 4,8C-1 Plot 124,8C-1 Line C<>8=>Goto 1 0->C Lbl 2 Isz C Plot 8C-4,7 Plot 8C-4,63 Line C<>16=>Goto 2 Plot 1,63 Plot 1,4 Line Plot 127,4 Line Plot 127,63 Line 11->H 31->P 64->X:35->Y Lbl 3 0->C Plot X,Y_ X<5=>Goto 3 X>123=>Goto 3 Y<8=>Goto 3 Frac ((Y+1)/8)=0=>Goto 3 Frac ((X-4)/8)=0=>Goto 3 X->V:Y->W 9-Int (Y/8)->A 2+Int ((X-5)/8)->B 8B-12->D 8(9-A)-1->E Mat Z[A,B]>100=>Goto 5 Mat Z[A,B]=0=>Goto O Mat Z[A,B]<9=>Goto A Goto 3 Lbl 5 Int (Mat Z[A,B]/100)->D 100Frac (Mat Z[A,B]/100)->E Goto 8 Lbl 6 1->C Int (Mat Y[1,N]/100)->D 100Frac (Mat Y[1,N]/100)->E Goto 8 Lbl 7 Dsz N:Goto 6 Goto 9 Lbl 8 Plot D+2,E+5 Plot D+1,E+5 Plot D+1,E+7 Line Plot D+3,E+7 Line Plot D+3,E+6 Plot D+6,E+3 Plot D+7,E+3 Plot D+7,E+1 Line Plot D+5,E+1 Line Plot D+5,E+2 Plot D+5,E+6 Plot D+5,E+7 Plot D+7,E+7 Line Plot D+7,E+5 Line Plot D+6,E+5 Plot D+3,E+2 Plot D+3,E+1 Plot D+1,E+1 Line Plot D+1,E+3 Line Plot D+2,E+3 C=0=>Goto 6 C=1=>Goto 7 Lbl A 8B-12->D 8(9-A)-1->E Mat Z[A,B]->C H>1=>9->Mat Z[A,B] A=1=>Goto K A=9=>Goto K B=1=>Goto K B=17=>Goto K C=0=>Goto B C=1=>Goto C C=2=>Goto D C=3=>Goto E C=4=>Goto F C=5=>Goto G C=6=>Goto H C=7=>Goto I C=8=>Goto J Lbl B Plot D+1,E+6 Plot D+2,E+7 Plot D+7,E+2 Plot D+6,E+1 Plot D+4,E+7 Plot D+1,E+4 Line Plot D+4,E+1 Plot D+7,E+4 Line Plot D+1,E+2 Plot D+6,E+7 Line Plot D+7,E+6 Plot D+2,E+1 Line Goto K Lbl C Plot D+3,E+6 Plot D+4,E+6 Plot D+4,E+2 Line Goto K Lbl D Plot D+2,E+6 Plot D+6,E+6 Line Plot D+6,E+4 Line Plot D+2,E+4 Line Plot D+2,E+2 Line Plot D+6,E+2 Line Goto K Lbl E Plot D+2,E+6 Plot D+6,E+6 Line Plot D+6,E+2 Line Plot D+2,E+2 Line Plot D+3,E+4 Plot D+5,E+4 Line Goto K Lbl F Plot D+2,E+6 Plot D+2,E+4 Line Plot D+5,E+4 Line Plot D+6,E+6 Plot D+6,E+2 Line Goto K Lbl G Plot D+6,E+6 Plot D+2,E+6 Line Plot D+2,E+4 Line Plot D+6,E+4 Line Plot D+6,E+2 Line Plot D+2,E+2 Line Goto K Lbl H Plot D+6,E+6 Plot D+2,E+6 Line Plot D+2,E+2 Line Plot D+6,E+2 Line Plot D+6,E+4 Line Plot D+3,E+4 Line Goto K Lbl I Plot D+2,E+6 Plot D+6,E+6 Line Plot D+5,E+2 Line Goto K Lbl J Plot D+2,E+6 Plot D+2,E+2 Line Plot D+6,E+2 Line Plot D+6,E+6 Line Plot D+3,E+6 Line Plot D+3,E+4 Plot D+5,E+4 Line Lbl K H<2=>Goto P H=11=>Plot V,W R-1->R R=0=>Golo L H=2=>Goto R H=3=>Goto S H=4=>Goto T H=5=>Goto U H=6=>Goto W H=7=>Goto V H=8=>Goto X H=9=>Goto Y H=10=>Goto Z H=11=>Goto 3 Lbl O 1->H Goto A Lbl P Mat Z[A-1,B]<>0=>Goto Q Dsz A 0->H Goto P Lbl Q Dsz A Mat Z[A,B]=9=>Goto R 2->H Goto A Lbl R 0->S:0->T Mat Z[A,B+1]->I I=0=>100A+B+1->Mat Y[1,P] I=0=>Isz P I=0=>Goto S Isz B 1->S I=9=>Goto S 3->H Goto A Lbl S I<>0=>Dsz B Mat Z[A,B-1]->I I=0=>100A+B-1->Mat Y[1,P] I=0=>Isz P I=0=>Goto T Dsz B 1->T I=9=>Goto T 4->H Goto A Lbl T Isz A I<>0=>Isz B 7->H Goto A Lbl V 0->K Mat Z[A,B+1]=0=>2->K S=1=>Isz K K=3=>100A+B+1->Mat Y[1,P] K=3=>Isz P K=3=>0->S K>1=>Goto U Isz B Mat Z[A,B]=9=>Goto U 1->S:5->H Goto A Lbl U K<2=>Dsz B 0->K Mat Z[A,B-1]=0=>2->K T=1=>Isz K K=3=>100A+B-1->Mat Y[1,P] K=3=>Isz P K=3=>0->T K>1=>Goto W Dsz B Mat Z[A,B]=9=>Goto W 1->T:6->H Goto A Lbl W K<2=>Isz B Mat Z[A+1,B]->I I=0=>Goto T Isz A Mat Z[A,B]=9=>Goto X 8->H Goto A Lbl X 0->K Mat Z[A,B+1]=0=>2->K S=1=>Isz K K=3=>100A+B+1->Mat Y[1,P] K=3=>Isz P K>1=>Goto Y Isz B Mat Z[A,B]=9=>Goto Y 9->H Goto A Lbl Y K<2=>Dsz B 0->K Mat Z[A,B-1]=0=>2->K T=1=>Isz K K=3=>100A+B-1->Mat Y[1,P] K=3=>Isz P K>1=>Goto Z Dsz B Mat Z[A,B]=9=>Goto Z 10->H Goto A Lbl Z P=31=>Goto 0 Dsz P Int (Mat Y[1,P]/100)->A 100Frac (Mat Y[1,P]/100)->B Mat Z[A,B]<>9=>Goto P Goto Z Lbl 0 11->H Plot V,W Goto 3 Lbl L Int (Mat Y[1,N]/100)->D 100Frac (Mat Y[1,N]/100)->E Plot D+4,E+1 Plot D+6,E+1 Plot D+5,E+1 Plot D+5,E+6 Line Plot D+2,E+6 Line Plot D+2,E+5 Plot D+4,E+5 Line Dsz N:Goto L Lbl 9 Line Mcl _________________________________________________________________________ Problems, comments, etc. to: _________________________________________________________________________