I'm bad at optimization. Kinematics anyone?
Can someone help optimize for size? This was decrypted by Cemetechs source coder. Please dont worry about any sub programs.
ClrHome
Lbl theta
Menu("Menu","Acceleration",1,"Initial V",2,"Final V",3,"Displacement",4,"Time",5,"Variables",VZ,"Exit",Q)
Lbl Q
ClrHome
Float
Asm(prgmZDONE
Return
Lbl VZ
ClrHome
Output(1,1,"Variable Index")
Output(2,1,"V = F. Velocity"
Output(3,1,"U = I. Velocity"
Output(4,1,"T = Time"
Output(5,1,"A = Acceleration"
Output(6,1,"D = Displacement"
Pause
Goto theta
Lbl 1
ClrHome
Menu("GIVEN:","V,U,T",Z,"D,U,T",B,"V,U,D",C,"Exit",Q
Lbl Z
Disp "V=U+AT"
Disp "(V-U)/T"
Prompt V,U,T
(V-U)/T->A
Goto A
Lbl B
Disp "D=UT+.5AT^^2"
Disp "A=2(D-UT)/T^^2"
Prompt D,U,T
2(D-UT)/T^^2->A
Goto A
Lbl C
Disp "V^^2=U^^2+2AD"
Disp "(V^^2-U^^2)/2D"
Prompt V,U,D
(V^^2-U^^2)/(2D)->A
Lbl A
Disp A
Pause
Goto theta
Lbl 2
ClrHome
Menu("GIVEN:","V,A,T",D,"D,A,T",E,"V,A,D",F,"D,T,V",G,"Exit",Q
Lbl D
Disp "V-AT"
Prompt V,A,T
V-AT->U
Goto U
Lbl E
Disp "D-(.5AT^^2)/T"
Prompt D,A,T
(D-(.5)(A)(T^^2))/T->U
Goto U
Lbl F
Disp "sqrt(V^^2-2AD)"
Prompt V,A,D
sqrt(V^^2-2AD)->U
Goto U
Lbl G
Disp "(2D/T)-V"
Prompt D,T,V
(2D/T)-V->U
Lbl U
Disp U
Pause
Goto theta
Lbl 3
ClrHome
Menu("GIVEN:","U,A,T",H,"U,A,D",I,"D,T,U",J,"Exit",Q
Lbl H
Disp "U+AT"
Prompt U,A,T
U+AT->V
Goto V
Lbl I
Disp "sqrt((U^^2+2AD)"
Prompt U,A,D
sqrt(U^^2-2AD)->V
Goto V
Lbl J
Disp "(2D/T)-U"
Prompt D,T,U
(2D/T)-U->V
Lbl V
Disp V
Pause
Goto theta
Lbl 4
ClrHome
Menu("GIVEN:","U,T,A",K,"U,V,A",L,"V,U,T",M,"Exit",Q
Lbl K
Disp "D=UT+.5AT^^2"
Prompt U,T,A
UT+(.5)(A)(T^^2)->D
Goto X
Lbl L
Disp "V^^2=U^^2+2AD"
Disp "(V^^2-U^^2)/2A"
Prompt U,V,A
(V^^2-U^^2)/(2A)->D
Goto X
Lbl M
Disp "D=.5(V+U)T"
Prompt V,U,T
.5(V+U)T->D
Lbl X
Disp D
Pause
Goto theta
Lbl 5
ClrHome
Menu("GIVEN:","A,V,U",N,"A,D,U",O,"D,U,V",P,"Exit",Q
Lbl N
Disp "V=U+AT"
Disp "(V-U)/A"
Prompt A,V,U
(V-U)/A->T
Disp T
Pause
Goto theta
Lbl O
Disp "D=UT+.5AT^^2"
Prompt A,D,U
If D<0
Then
(D*~1)->D
End
If U!=0:Then
Goto 8
End
If U=0:Then
Goto 6
End
Lbl 8
(A/2)->A
sqrt(U^^2-4(A)(D))->Z
(~U+Z)/(2A)->X
(~U-Z)/(2A)->Y
Disp X,Y
Pause
Goto theta
Lbl P
Disp "2D/(V+U)"
Prompt D,U,V
2D/(V+U)->T
Disp T
Pause
Goto theta
Lbl 6
sqrt(2D/A)->T
Disp T
Pause
Goto theta
Lbl Q
ClrHome
Return