Frage

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.

War es hilfreich?

Lösung

All assemblers I know of have such a feature.

mov eax, 8
db 90h ; this is "nop"
add eax, 10
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top