mirror of
				https://gitlab.com/80486DX2-66/gists
				synced 2025-05-31 08:31:41 +05:30 
			
		
		
		
	C: add jokes/brexit.c
This commit is contained in:
		
							
								
								
									
										28
									
								
								c-programming/jokes/brexit.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								c-programming/jokes/brexit.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
/*
 | 
			
		||||
 * brexit.c
 | 
			
		||||
 *
 | 
			
		||||
 * Author: Intel A80486DX2-66
 | 
			
		||||
 * License: Creative Commons Zero 1.0 Universal
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
 | 
			
		||||
__attribute__((naked)) __attribute__((noreturn)) void Brexit(void);
 | 
			
		||||
 | 
			
		||||
__attribute__((naked))
 | 
			
		||||
__attribute__((noreturn))
 | 
			
		||||
void Brexit(void) {
 | 
			
		||||
    __asm__ volatile (
 | 
			
		||||
        "movl $0x7F, %%ebx\n\t"
 | 
			
		||||
        "movl $1, %%eax\n\t"
 | 
			
		||||
        "int $0x80"
 | 
			
		||||
        :
 | 
			
		||||
        :
 | 
			
		||||
        : "eax", "ebx"
 | 
			
		||||
    );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int main(void) {
 | 
			
		||||
    Brexit();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user