mirror of
https://github.com/ish-app/ish.git
synced 2026-01-18 13:57:29 +00:00
13 lines
330 B
C
13 lines
330 B
C
// compile with cc -m32 -nostdlib
|
|
char hello[] = "Hello, world!\n";
|
|
|
|
void _start() {
|
|
long result;
|
|
__asm__ volatile("int $0x80"
|
|
: "=a" (result)
|
|
: "a" (4), "b" (1), "c" (hello), "d" (sizeof(hello) - 1));
|
|
__asm__ volatile("int $0x80"
|
|
: "=a" (result)
|
|
: "a" (1), "b" (0));
|
|
}
|