Name
Name

Reputation: 2045

Is there an assembler that will let me 'inline' machine code?

I've done lots of looking on Google for a way that you could include machine code right inside of an assembly source file. I haven't had any luck.

What I mean by 'inline machine code' might be unclear, so let me provide you with an example of what I'm looking for:

; here's my normal assembly code...
mov eax, 8
add eax, 10
; now I would like to be able to add some machine code
__machinecode__("40") ; this is equivalent to 'inc eax' (I think!)

So, that's it.

Upvotes: 2

Views: 651

Answers (1)

Alexey Frunze
Alexey Frunze

Reputation: 62068

All assemblers I know of have such a feature.

mov eax, 8
db 90h ; this is "nop"
add eax, 10

Upvotes: 7

Related Questions