Minesweeper for the CASIO fx-9750G PLUS

K basically this is a crap language to program in, and even worse to put in plain text,
so -> is an arrow, => is a double arrow, and <> is a not-equals. Have fun
NoFriLLz

ClrText
1->P
1->Q
{8,21}->Dim Mat B
{8,21}->Dim Mat C
For 1->A To 40
Int (20Ran#+1)->H
Int (7Ran#+1)->G
Mat B[G,H]=1=>Dsz A
1->Mat B[G,H]
Next
For 1->A To 7
For 1->B To 20
9->Mat C[A,B]
Next
Next
Lbl 1
P<1=>1->P
Q<1=>1->Q
P>7=>7->P
Q>20=>20->Q
Locate Q,P,"#"
Getkey->K
Mat C[P,Q]=9=>Locate Q,P," "
Mat C[P,Q]<>9=>Locate Q,P,Mat C[P,Q]
K=37=>Isz P
K=38=>Dsz Q
K=28=>Dsz P
K=27=>Isz Q
K=31=>Goto 2
Goto 1
Lbl 2
P->M
Q->N
Lbl 3
0->U
Mat B[M,N]=1=>Goto 4
For M-1->G To M+1
For N-1->H To N+1
If H>0
Then G>0=>U+Mat B[G,H]->U
IfEnd
Next
Next
U->Mat C[M,N]
Goto 1
Lbl 4
Locate 1,1,"YOU LOSE"