Ok, I had a good look through. I didn't check through everything, so I appologise in advance if I suggest something that conflicts with something I didn't look at.
Ok first up, look at your gosubs. Here's an example:
_tank05:
speed = 2
if tm05>0 then moveable =1
if upkey()=1 then dec tm05,1
if tm05<1 then moveable=0
return
Now all though I didn't really look into exactly what each variable does, you can still see that, in essense, the sub routines are the same. You just need to think of a way to represent the otherwise unique variables and numbers with something more general. So here's a possible structure:
function ProcessUnit(unit)
if tm(unit)>0 then moveable(unit) =1
if upkey()=1 then dec tm(unit),1
if tm(unit)<1 then moveable(unit)=0
endfunction
It looks like you're basically checking each unit to see if its movable or not, and then setting another variable accordingly. Same with the speed. It looks like depending on what unit it is, you're setting a speed variable. If this is the case, then you could set each units speed value at the beginning and not have to adjust it in this procedure.
Doing it this way means you'll only need this one function to control every single unit.
To therefore call the function properly, you need to change this:
If key = 1 then gosub _mech01
If key = 2 then gosub _mech02
If key = 3 then gosub _mech03
If key = 4 then gosub _mech04
If key = 5 then gosub _mech05
If key = 6 then gosub _tank01
If key = 7 then gosub _tank02
If key = 8 then gosub _tank03
If key = 9 then gosub _tank04
If key = 10 then gosub _tank05
If key = 11 then gosub _tank06
If key = 12 then gosub _tank07
If key = 13 then gosub _tank08
If key = 14 then gosub _tank09
If key = 15 then gosub _tank10
if key = 16 then gosub _infantry01
if key = 17 then gosub _infantry02
if key = 18 then gosub _infantry03
if key = 19 then gosub _infantry04
if key = 20 then gosub _infantry05
if key = 21 then gosub _infantry06
if key = 22 then gosub _infantry07
if key = 23 then gosub _infantry08
if key = 24 then gosub _infantry09
if key = 25 then gosub _infantry10
if key = 26 then gosub _infantry11
if key = 27 then gosub _infantry12
if key = 28 then gosub _infantry13
if key = 29 then gosub _infantry14
if key = 30 then gosub _infantry15
To this:
if key >= 1 and key <=30
ProcessUnit(key)
endif
So now you have the function being called and the right unit number being passed to the process, to tell it which unit its dealing with.
But now we have this in place, we need the arrays to handle the function above. So instead of:
mm01=100:m01=1
mm02=100:m02=1
mm03=100:m03=1
mm04=100:m04=1
mm05=100:m05=1
tm01=100:t01=1
tm02=100:t02=1
tm03=100:t03=1
tm04=100:t04=1
tm05=100:t05=1
tm06=100:t06=1
tm07=100:t07=1
tm08=100:t08=1
tm09=100:t09=1
tm10=100:t10=1
im01=100:i01=1
im02=100:i02=1
im03=100:i03=1
im04=100:i04=1
im05=100:i05=1
im06=100:i06=1
im07=100:i07=1
im08=100:i08=1
im09=100:i09=1
im10=100:i10=1
im11=100:i11=1
im12=100:i12=1
im13=100:i13=1
im14=100:i14=1
im15=100:i15=1
We can use:
dim tm(30) as integer
dim speed(30) as integer
dim Moveable(30) as integer
I've used TM as I don't know what the actual variables are storing, but obviously you could call the variable whatever is generic.
Notice how throughout your program you're using the variable "key" to tell the program which object is being controlled, and then you're using
position object "key" commands etc. Well, the same principle applies to the array and the functions. Use the variable key to say which position the array you want to access, and to tell the function which unit you want to control.
So, in all your following subroutines which refer to moveable and speed, instead you just need to refer to Speed(key) and Moveable(key)
Anyway, hope that helps you out a bit. I must confess, I didnt look through your code quite as closely as I could've done, but to be fair I'm half asleep and I've had a few beers.

You should be able to get something from that though - there is a really efficient and structured approach to everything, and for the proggy you're doing there, functions and arrays could definitely save you a lot of work.
Insiiiiiiiiiiiiiiiiiiiiiiiide!