Ok, so what opcodes would u add to my set?
I'm not sure about your notation of addresses. So I'm going to assume 'm' is an address of m and [m] is a value under m.
1. All jump instruction with a constant or memory arguments. Why only memory?
2. All arithmetic and boolean operations with constants also. No point inputting constant values into temporary memory places.
3. call with arguments, push, pop, ret n instruction.
4. Allow indirect indexes. So you could write [m1+[m2]] meaning m1[m2] or [m1+constant]. This will shorten use of arrays considerably.
5. Allow shifting addresses by a constant, ie. multiplying by a power of 2. [m1+[m2]*2] or *4, 8. x86 does this also. This eliminates the need to create a temporary variable, shift it, and then use it as an index.
6. Allow different operand sizes, the way x86 and amd64 does it. Currently to input a byte you would need to first (1) mask your value with and, then (2) shift it, then (3) mask the output with and, then (4) or the value in place. Four instructions for a common operation.
So a move instruction would look like:
mov size[address], constant
mov size[address], [address2]
where size is one of: byte, word, dword, qword.
Same for boolean and arithmetic operations.
7. An instruction which allows calculation of addresses generated by a (4)+(5) form. The equivalent in x86 is called lea.
For stack: just designate memory at address 0 as a 32 bit stack pointer.
Very simple to implement, and the scripting codes will be drastically shorter and faster due to that.