1
0
mirror of https://gitlab.com/80486DX2-66/gists synced 2024-12-29 03:30:20 +05:30
gists/c-programming/jokes/brexit.c

32 lines
565 B
C
Raw Normal View History

2024-02-04 14:06:09 +05:30
/*
* brexit.c
*
* Author: Intel A80486DX2-66
* License: Creative Commons Zero 1.0 Universal
*/
#if !(defined(unix) || defined(__unix) || defined(__unix__) || \
defined(__APPLE__) || defined(__MACH__))
# error "The architecture isn't supported for the joke :-)"
#endif
void Brexit(void) __attribute__((noreturn));
2024-02-04 14:06:09 +05:30
__attribute__((noreturn))
void Brexit(void) {
__asm__ volatile (
"movl $0x7F, %%ebx\n\t"
"movl $1, %%eax\n\t"
"int $0x80"
:
:
: "eax", "ebx"
);
for (;;); // https://stackoverflow.com/a/15964365
2024-02-04 14:06:09 +05:30
}
int main(void) {
Brexit();
2024-02-04 14:06:09 +05:30
}