АШ
Size: a a a
АШ
АШ
s
# 1.S
.intel_syntax noprefix
.section .text
.global _main
.extern _some_c_function
_main:
push offset some_text
push 12345
call _some_c_function
add esp,8
xor eax,eax
ret
.section .data
some_text: .asciz "some text"
// 2.c
#include <stdio.h>
void some_c_function(int n, const char *s)
{
printf("Hello, world!\n%d %s\n", n, s);
}
Собирать можно просто cc -m32 1.S 2.c
АШ
АШ
АШ
АШ