Update src/main.c
This commit is contained in:
27
src/main.c
Normal file
27
src/main.c
Normal file
@@ -0,0 +1,27 @@
|
||||
// this code is licenced under Wrathmark licence
|
||||
// © 2026 wullie wulliestudio.com
|
||||
// please see attached licence for full usage and rights
|
||||
|
||||
#include "stdWullie.h"
|
||||
|
||||
int main(){
|
||||
print("look Ma no stdlib\n");
|
||||
ColorPrint("NOW WITH COLORS\n", RED);
|
||||
BackgroundPrint("and backgrounds\n", BBLUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// #I say softly to myself "FUCK YOUR STDLIB"#
|
||||
// handles the main loop
|
||||
__attribute__((naked)) void _start(){
|
||||
__asm__ __volatile__(
|
||||
"xor %ebp, %ebp\n"
|
||||
"mov (%rsp), %rdi\n"
|
||||
"lea 8(%rsp), %rsi\n"
|
||||
"and $-16, %rsp\n"
|
||||
"call main\n"
|
||||
"mov %rax, %rdi\n"
|
||||
"call exit\n"
|
||||
);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user