An ASM/C type lang
Posted: Thu Mar 12, 2009 7:03 pm
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)
What makes me even more interested in this is that I've been studying compilers lately. So this might be something to try out.
Code: Select all
#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);
}