Creating costume asmcode with a C-compiler
Posted: Thu Apr 25, 2002 4:41 pm
Is it possible to configure, for example GCC, to create costume asmcode for an operating system?
Linux dosnt look like Windows when you look upon it from a asm'ers view. You dosnt push all the parameters and then call for interrupt 0x80 in linux.. But i guess you already knew that
Is it possible to change the way the compiler compiles code (and i am not talking about rewriting it)? There are lots of ways a simple piece of code could be compiled (into).
just consider this:
(both k and a are integers)
k++;
a = k;
translated to asm:
mov eax, [k_variable]
inc eax
mov [k_variable], eax
mov [a_variable], eax
or
mov eax, [ebp+8]
inc eax
mov [ebp+8], eax
mov [ebp+4], eax
etc etc etc.
I would like to create costume asmcode for my operating system. I WANT to control every single piece of my code! >:(
If there is no way to do this, is there any other way to do it? If so, how?
Hum. I guess i made my point. Youll have to excuse me, it's late here in sweden now
Anyone?
// SMURPHY - the guy in your head
Linux dosnt look like Windows when you look upon it from a asm'ers view. You dosnt push all the parameters and then call for interrupt 0x80 in linux.. But i guess you already knew that
Is it possible to change the way the compiler compiles code (and i am not talking about rewriting it)? There are lots of ways a simple piece of code could be compiled (into).
just consider this:
(both k and a are integers)
k++;
a = k;
translated to asm:
mov eax, [k_variable]
inc eax
mov [k_variable], eax
mov [a_variable], eax
or
mov eax, [ebp+8]
inc eax
mov [ebp+8], eax
mov [ebp+4], eax
etc etc etc.
I would like to create costume asmcode for my operating system. I WANT to control every single piece of my code! >:(
If there is no way to do this, is there any other way to do it? If so, how?
Hum. I guess i made my point. Youll have to excuse me, it's late here in sweden now
Anyone?
// SMURPHY - the guy in your head