Что это за сборка стиля (intel, att... и т. д.?) и как ее создать?C++

Программы на C++. Форум разработчиков
Anonymous
 Что это за сборка стиля (intel, att... и т. д.?) и как ее создать?

Сообщение Anonymous »

Я пытаюсь создать такой ассемблерный код (чтобы он работал с 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'
Во-первых, что это за стиль сборки, а во-вторых, как я могу создать его из файла C, используя команду, аналогичную коду gcc -S code.c -o. S -masm=intel

Подробнее здесь: https://stackoverflow.com/questions/100 ... produce-it

Вернуться в «C++»