stub process
This commit is contained in:
parent
5aa2889ca0
commit
d1f512e3a0
6
sys/include/extern.h
Normal file
6
sys/include/extern.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef EXTERN_H
|
||||||
|
#define EXTERN_H
|
||||||
|
|
||||||
|
extern void *malloc(s32 size);
|
||||||
|
|
||||||
|
#endif
|
@ -19,12 +19,12 @@
|
|||||||
* so this complicated structure is utilized instead.
|
* so this complicated structure is utilized instead.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define START 0xb80f1
|
#define START 0xb80f0
|
||||||
#define SIZE 16384
|
#define SIZE 16384
|
||||||
#define USABLE(m) m + sizeof(s32) + sizeof(void *)
|
|
||||||
#define NEXT(m) (void *) *m
|
|
||||||
#define SIZE(m) (s32) m[sizeof(void *)]
|
|
||||||
|
|
||||||
void *start = 0x0;
|
struct allocated {
|
||||||
|
void *ref;
|
||||||
|
s32 size;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
10
sys/include/process.h
Normal file
10
sys/include/process.h
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef PROCESS_H
|
||||||
|
#define PROCESS_H
|
||||||
|
|
||||||
|
struct process {
|
||||||
|
void *prstart;
|
||||||
|
s32 prsize;
|
||||||
|
s32 pid;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -10,10 +10,11 @@ strlen(const char *str)
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s32
|
||||||
printf(const char *format, ...)
|
printf(const char *format, ...)
|
||||||
{
|
{
|
||||||
const u32 len = strlen(format);
|
const u32 len = strlen(format);
|
||||||
|
|
||||||
vga_write(format, len, 0x0f);
|
vga_write(format, len, 0x0f);
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
@ -7,4 +7,4 @@ void *malloc(s32 size) {
|
|||||||
u32 addr = curr;
|
u32 addr = curr;
|
||||||
curr += size;
|
curr += size;
|
||||||
return (void*)addr;
|
return (void*)addr;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
#include <types.h>
|
#include <types.h>
|
||||||
|
#include <extern.h>
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
sysinit(void)
|
sysinit(void)
|
||||||
@ -7,44 +9,8 @@ sysinit(void)
|
|||||||
char *howday = "Om Smarter.";
|
char *howday = "Om Smarter.";
|
||||||
|
|
||||||
vga_clearscreen();
|
vga_clearscreen();
|
||||||
/*
|
vga_write("Starting omOS...", 16, 0x0F);
|
||||||
for (s16 i = 0; i < 100; i++) {
|
|
||||||
vga_write(howdy, strlen(howdy), 0x1f);
|
|
||||||
vga_write(howday, strlen(howday), 0x0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
vga_write("sid", 3, 0x07);
|
s8 *start = (s8 *) 0xb8fa0;
|
||||||
vga_write("did", 3, 0x07);
|
start[0] = 'h';
|
||||||
vga_write("fid", 3, 0x07);
|
|
||||||
*/
|
|
||||||
|
|
||||||
vga_write(
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
|
|
||||||
"bob", 2003, 0x0F);
|
|
||||||
vga_write("indian", 6, 0x07);
|
|
||||||
vga_write("indian", 6, 0x07);
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user