1
0
mirror of https://gitlab.com/80486DX2-66/gists synced 2025-01-14 13:12:05 +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> #include <stdio.h>
__attribute__((naked)) __attribute__((noreturn)) _Noreturn void Brexit(void); __attribute__((noreturn)) _Noreturn void Brexit(void);
__attribute__((naked))
__attribute__((noreturn)) __attribute__((noreturn))
_Noreturn _Noreturn
void Brexit(void) { void Brexit(void) {
__asm__ volatile ( asm volatile (
"movl $0x7F, %%ebx\n\t" "movl $0x7F, %%ebx\n\t"
"movl $1, %%eax\n\t" "movl $1, %%eax\n\t"
"int $0x80" "int $0x80"
: :
: :
: "eax", "ebx" : "eax", "ebx"
); );
for (;;); // https://stackoverflow.com/a/15964365
} }
int main(void) { int main(void) {
Brexit(); Brexit();
} }