我正在尝试将一些用Visual Studio编写的汇编代码移植到
Linux上的GNU内联汇编中.原始代码使用
_emit,MSDN将其描述为伪指令,并解释为:
The _emit pseudoinstruction is similar to the DB directive of MASM. You use _emit to define a single immediate byte at the current location in the current text segment. However,_emit can define only one byte at a time,and it can only define bytes in the text segment. It uses the same Syntax as the INT instruction.
我怎样才能在Linux上做同样的事情?
解决方法
要发出字节0x12(例如),请执行:
asm __volatile__ (".byte 0x12");@H_404_13@虽然,启用优化后可能会得到令人惊讶的结果.