View Single Post
  #1 (permalink)  
Old 01-30-2008, 09:26 AM
steffanp steffanp is offline
Newbie
 
Join Date: Jan 2008
Posts: 1
Credits: 0
Rep Power: 0
steffanp is on a distinguished road
Default Generating executable machine code

Hi.
I am (for learning reasons) trying to develop a very small programming language. My language compiler works by compiling the code written, to x86 assembly, and then "compiling" the assembly to machine code.

The problem is that I don't know how to do the last step. I have heard that each assembly instruction must be compiled to 8-bits that the CPU can understand. So compiling the following assembly code, would generate 2X8bits, like seen below.

mov ax, 1234h 00101000 //these 8bit strings are just guesses
mov bx, ax 10011010

Is my theory correct that all assembly instructions must be compiled to an 8bit code that the CPU can understand? If yes, does anyone know where to get a list of these 8bit codes for each x86 assembly instruction?

If I am completely wrong about everything, please write how assembly is really converted into machine code.

Thanks.
Reply With Quote

Sponsored Links