THis is in the DNAExecution module:
Private Sub ExecuteStores(n As Integer)
Select Case n
Case 1 'store
DNAstore
rob(currbot).nrg = rob(currbot).nrg - SimOpts.Costs(COSTSTORE)
Case 2 'inc
DNAinc
rob(currbot).nrg = rob(currbot).nrg - SimOpts.Costs(COSTSTORE) / 10
Case 3 'dec
DNAdec
rob(currbot).nrg = rob(currbot).nrg - SimOpts.Costs(COSTSTORE) / 10
Case 4 '+=
Case 5 '-=
Case 6 '*=
Case 7 '/=
End Select
End Sub
Private Sub DNAstore()
Dim b As Long
b = PopIntStack
If b > 0 And b <= MaxMem Then
rob(currbot).mem(b) = PopIntStack Mod 32000
End If
End Sub
Private Sub DNAinc()
Dim a As Long, b As Long
a = PopIntStack
If a >= 1 And a <= 1000 Then
b = (rob(currbot).mem(a) + 1) Mod 32000
rob(currbot).mem(a) = b
End If
End Sub
Private Sub DNAdec()
Dim a As Long, b As Long
a = PopIntStack
If a >= 1 And a <= 1000 Then
b = (rob(currbot).mem(a) - 1) Mod 32000
rob(currbot).mem(a) = b
End If
End Sub
change this to:
Private Sub ExecuteStores(n As Integer)
Select Case n
Case 1 'store
DNAstore
Case 2 'inc
DNAinc
Case 3 'dec
DNAdec
Case 4 '+=
Case 5 '-=
Case 6 '*=
Case 7 '/=
End Select
End Sub
Private Sub DNAstore()
Dim b As Long
b = PopIntStack
If b > 0 And b <= MaxMem Then
rob(currbot).mem(b) = PopIntStack Mod 32000
rob(currbot).nrg = rob(currbot).nrg - SimOpts.Costs(COSTSTORE)
End If
End Sub
Private Sub DNAinc()
Dim a As Long, b As Long
a = PopIntStack
If a >= 1 And a <= 1000 Then
b = (rob(currbot).mem(a) + 1) Mod 32000
rob(currbot).mem(a) = b
rob(currbot).nrg = rob(currbot).nrg - SimOpts.Costs(COSTSTORE) / 10
End If
End Sub
Private Sub DNAdec()
Dim a As Long, b As Long
a = PopIntStack
If a >= 1 And a <= 1000 Then
b = (rob(currbot).mem(a) - 1) Mod 32000
rob(currbot).mem(a) = b
rob(currbot).nrg = rob(currbot).nrg - SimOpts.Costs(COSTSTORE) / 10
End If
End Sub
BTW, does anyone know if there's a way I could just post code and highlight changes in like red? THe color tags won't work if I have the code tags on.