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:
parent
2001b310d7
commit
2ab2a332a1
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user