Convert asm instruction to corresponding bytes
Just as the title says, I want to 'convert' (poor word choice) from asm instruction to cpu code.
mov eax, ebx
mov ebx, eax
mov [eax], ebx
etc, etc.
It's basically just a look-up table since asm is just a text representation of the code, but I was wondering if anyone had comments/suggestions?
-My basic idea (since I know a little about asm, but not much:and will only work for my cpu type obviously) was to use CheatEngine because it allows you to type in asm and it'll compile for you. So basically I'm going to manually type in instructions into CE and see what the resulting bytes are, and go from there.

The goal is, for creating code-caves and what-not, since vb doesn't have __asm like C++ does.
Future code demo might look something like...
-I don't want a full blown compiler! Only supporting a very small subset of the instructions. It doesn't have to make multiple passes over the asm code! No loops etc. And I know the jmps will be slightly tricky. I basically know what I have to do: I'm not looking for a "how to", just any suggestions/comments.
Comments are appreciated.
mov eax, ebx
mov ebx, eax
mov [eax], ebx
etc, etc.
It's basically just a look-up table since asm is just a text representation of the code, but I was wondering if anyone had comments/suggestions?
-My basic idea (since I know a little about asm, but not much:and will only work for my cpu type obviously) was to use CheatEngine because it allows you to type in asm and it'll compile for you. So basically I'm going to manually type in instructions into CE and see what the resulting bytes are, and go from there.

The goal is, for creating code-caves and what-not, since vb doesn't have __asm like C++ does.
Future code demo might look something like...
Code:
Dim asmStrings As List(Of String) += "push eax" += "mov eax, 1234" += "mov [eax], esp" += "add eax, 1" // inc eax? += "mov [eax], ebp += "pop eax" += "rtn" Dim someBytes() as Byte = MyLittleCompilerClass.Compile(asmStrings) ..
Comments are appreciated.
It will probably only support the mov, add, inc and push/pop commands (2-3 more). Should be enough for the codecaves I make. We'll see in a couple days.

Will post some actual code later. It's not very object-oriented (a few too many variables named 'tmpString'), but it'll get there.

Will work on it more tonight, and update thread sometime soon.