CeDOS - src/apps/start.c

src/apps/start.c (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "assembly.h"

#include <stdint.h>

extern void fib(void);

int start(char *args) {
    //uint32_t eip, esp, ebp;
    //__asm__ volatile ("call jump; jump: pop %0; mov %%esp, %1; mov %%ebp, %2" : "=m" (eip), "=m" (esp), "=m" (ebp));

    int pid = get_pid();
    while (1) {
        printf("Process #%i says: \"%s\".\n", pid, args);
        yield();
    }

    fib();

    while(1);
}