I was thinking about how it would be awesome if we had a programming language that combined c and asm into something like this: (The code is pretty random but that's beside the point)
#include "includfile.lh"
#defien YOURMOM 0xDEADBEEF
out32{ // this means all of the code between the braces is output as 32 bit
bool truefalse;
u8 byte;
u16 word;
u32 dword;
u64 qword;
struct rand
{
u8 val = 23; //allow for default values to be declared
}
start main() //declare the start function
{
rand myrand;
mov eax,dword; //mov data into register
CR0 = 0; //normally you wouldn't do this but this is just an example
if(myrand.val != 0)
{
pntr p = &qword; //pointers
[p]
}
}
}
u8 randf(u8 pissbyte)
{
return(pissbyte*YOURMOM);
}
What makes me even more interested in this is that I've been studying compilers lately. So this might be something to try out.
C is already high level assembly. The reason that C was created was to make assembly be portable. You're taking away the whole reason that we use C in the first place.
The problem is local variables (like rand in your example) clashing with registers. You would need to tell the compiler what registers it can use for calculations with local variables and what registers you're using.
Why would you need the "main()" keyword if "start" defines the start of your code?
I still like Lisp. Write a systems-level Lisp variation. When you parse the code it's already split into a graph showing the flow of data, making it easy to detect/remove dead code.