1
0
mirror of https://gitlab.com/80486DX2-66/gists synced 2025-01-10 08:27:48 +05:30

C: jokes/brexit.c: simplify, fix SIGSEGV

Fix the indentation
This commit is contained in:
パチュリー・ノーレッジ 2024-02-04 11:55:56 +03:00
parent 2001b310d7
commit 2ab2a332a1
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -7,22 +7,23 @@
#include <stdio.h>
__attribute__((naked)) __attribute__((noreturn)) _Noreturn void Brexit(void);
__attribute__((noreturn)) _Noreturn void Brexit(void);
__attribute__((naked))
__attribute__((noreturn))
_Noreturn
void Brexit(void) {
__asm__ volatile (
"movl $0x7F, %%ebx\n\t"
"movl $1, %%eax\n\t"
"int $0x80"
:
:
: "eax", "ebx"
);
asm volatile (
"movl $0x7F, %%ebx\n\t"
"movl $1, %%eax\n\t"
"int $0x80"
:
:
: "eax", "ebx"
);
for (;;); // https://stackoverflow.com/a/15964365
}
int main(void) {
Brexit();
Brexit();
}