문제

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.

도움이 되었습니까?

해결책

All assemblers I know of have such a feature.

mov eax, 8
db 90h ; this is "nop"
add eax, 10
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top