I need I little help. I think it's only a problem of relocation, but I need some advice

Ok, my boot loads some sectors in memori 0x1000:0 (0x00010000) then switches in pmode, then jumps to 0x00010000.
Ok, the 32-bit code is simple, write a letter directly in video-memory.
When I create this code in asm it's all ok, no craches.
When I create this code in c, I have some problems.
The c code is like
void _main()
{
*((int *)0xb8000)=0x07650765;
while(0)
{}
}
ok, If you eliminate the video statement no crashes happen.
I compiled this in all possible mode:
gcc -c kernel.c -o kernel.bin -nostdlib -nostartfiles ecc...
ld ... --Ttext 0x10000 --oformat binary
crash!
I recompiled gcc/as for using elf target and I used the ld script found in osdev, and the loader to make the jump to _main...
crash!
How can complie and link my kernel in C (remember now I also have a gcc/as for elf)
Where do you think the error is?
Can you show me how can complie and link my kernel in c?
Thanks...
Bye from Italy