这是什么样式的组装(英特尔,att..等等?以及我如何生产它
What style assembly is this (intel, att...etc?) and how can I produce it?
我正在尝试生成这样的汇编代码(以便它与 nasm 一起使用)
;hello.asm
[SECTION .text]
global _start
_start:
jmp short ender
starter:
xor eax, eax ;clean up the registers
xor ebx, ebx
xor edx, edx
xor ecx, ecx
mov al, 4 ;syscall write
mov bl, 1 ;stdout is 1
pop ecx ;get the address of the string from the stack
mov dl, 5 ;length of the string
int 0x80
xor eax, eax
mov al, 1 ;exit the shellcode
xor ebx,ebx
int 0x80
ender:
call starter ;put the address of the string on the stack
db 'hello'
首先,这是什么程序集样式,其次,如何使用类似于 gcc -S code.c -o code.S -masm=intel
的命令从 C 文件生成它
这是
英特尔的风格。
您在问题中编写的命令行有什么问题?
相关文章:
- 函数何时会在c++中包含stack_Unwind_Resume调用
- Python中的for循环与C++有何不同
- 函数名称表示什么等等
- 在C++中释放内存期间,迭代器与指针有何不同
- 标准对此指向成员函数类型模板参数有何说明?是我的代码有误,还是 MSVS 16.6 有问题?
- 创建进行生产构建并创建调试信息的C++生成文件的最佳方法?
- 类中的 C++ int 被设置为值,似乎不知从何而来
- -fvisibility-inline-hidden 与 gcc 中的 -fvisibility=hidden 有何不同
- 如何创建结构的结构结构,等等嵌套多个结构?
- 如何在生产中避免vtable查找,并且仍然能够在单元测试中进行广泛的模拟
- O(NlogN)算法运行速度快于O(n)..等等,什么
- 收益率和回报有何不同?
- 覆盖私有功能,它与受保护功能有何不同?
- 擦除删除成语的性能增益从何而来
- 无论代码长度如何,以下代码的内存要求有何不同?
- "virtual"对C++析构函数有何影响?
- 如果我对"while"块发表评论,为什么程序会死机?其中的"yield"线有何影响?
- 系统时间从何而来?
- stl::unordered_map 和 stl::vector 的销毁有何不同
- 这是什么样式的组装(英特尔,att..等等?以及我如何生产它