* mikeOS 16 bit and amd64 baremetal
[mascara-docs.git] / amd64 / bareMetalOS-0.5.2 / baremetal-libc / crt0.c
blob261ea57889de554bfa2982ca0c7870db33064edf
2 extern int main(); //int argc, char **argv, char **environ);
4 extern char __bss_start, _end; // BSS should be the last think before _end
6 // XXX: environment
7 char *__env[1] = { 0 };
8 char **environ = __env;
10 _start(){
11 char *i;
13 // zero BSS
14 for(i = &__bss_start; i < &_end; i++){
15 *i = 0;
19 // XXX: get argc and argv
21 exit(main(0,0, __env));