Okay, as promised I will try to optimize some things, but here are general tips:
80->Y:20->L2(2) can be
20->L2(2)*4->Y
You can replace every
FillRectangle with
FillRectangle_NoClip.
FillRectangle(0,230,320,240) Why do display such large rectangle? 240 is the height, not the bottom Y
You might need
FillRectangle(0,230,320,10) I guess.
You don't need
SetDefaultPalette,
Begin already sets the standard palette.
1->A:0->C can be
1->A-1->C
FillScreen(0):1->A....:FillScreen(255). You can omit both
FillScreen, since
FillScreen(0) is useless, and the screen is already white by
Begin
Code: If A=110
110->A
End
Well...
Code: If A=9
Return
End
If A=54
Return
End
->Code: If A=9 or A=54
Return
End
Code: If A=4
Y-10->Y
End
If A=1
Y+10->Y
End
If Y<80
Y+10->Y
End
If Y>110
Y-10->Y
End
->Code: max(80,min(110,Y-getKey(4)*10+getKey(1)*10->Y
Code: Lbl GETK
0->A
While A=0
getKey->A
End
Return
->Code: Repeat getKey->A
This code is so small, you can replace the Call GETK with this.
Code: If Y=80
1->T
End
If Y=90
2->T
End
If Y=100
3->T
End
->Code: Y/10-7->T
0->S:0->P can be 0->S->P
C functions arguments can be a full expression:
Code: remainder(rand,3)->B
L1(1)+B->L1(1)
SetTextXY(50,120)
PrintUInt(B,1)
can beCode: SetTextXY(50,120)
PrintUInt(remainder(rand,3)->B,1)
L1(1)+B->L1(1)
These are for now the main optimizations, good luck!