it was encouraged by how many people have to do work arounds in C to get their kernel to do what they want
what I thought about is basically complete linker and compiler control from the source file(conflicts when compiling multiple objs and linking them together but...)
with my current design(its all in my mind so will change as I code)
the features will be:
1. EXTREMELY C based, basically like an enhanced/non-standard C
2. will support a thing I like to call "variable to function aliasing" which is where you can make a special variable like do somehting like this:
Code: Select all
ALIAS unsigned int blah=0:&Func1,&Func2; //Func1 is for when someone reads it, Func2 is when someone sets it
unsigned int Func1(){
return 1;
}
void Func2(unsigned int blah){
//you can set something here
}
void _main(void){
unsigned char tmp;
blah=23 //this will call Func2(23)
tmp=blah; //this will call Func1 and will set tmp to 1
}
3.it will support linked lists like this:
Code: Select all
typedef struct{
unsigned int blah;
NEXT_PTR: void *next; //signifies that this is to be used in linked listing for the "next" pointer
}linky;
void _main(){
LINKED_LIST linky test[5];
//that will create 5 of those structs and set next to the next one of course
test[4].next=0x40
test[5].blah=20 //writes blah to the address of 0x40
}
4. also will have complete control over optimizations, and if you enable none then it doesn't do those annoying things like store variables in registers
and can do this
Code: Select all
void _main(){
?Optimization: variable_registers.on //the ? is for compiler options and the ending .on is to turn it on or off of course
blah=25;
//the variable is stored in a temporary register!
?Optimization: variable_registers.off; //turn it off
blah=54; //this is written to the actual memory address of the vairable now!
}
5.complete control over how the compiler behaves at compile time like this
Code: Select all
?Temp_Register1: EAX;
blah=2+2+blah2; //this will use eax for a temporary vairable for the maths
?Temp_Register1: EBX;
blah=2+2+blah2; //and now it uses EBX
?Temp_Register1: STACK;
blah=2+2+blah2; //and now it uses the stack, and if it uses other vairables then it pusha's them
Code: Select all