Hi,
I am writing an operating system for educational and I've
got a problem with the use of C combined to asm.
I use nasm + gcc.
my asm look like :
[BITS 32]
global outb
outb:
pop eax
pop edx
out dx, al
and my C look like:
void outb(short ****t, char value);
void func()
{
outb(0x3f8, 1);
}
I compile this on unix (OpenBSD) with :
gcc -c func.c -o func.o
nasm -f elf io.S -o io.o
ld *.o -o kern
But when I launched my binary on a vm the vm crash and say
that there are an io****t problem.
So can I ask you if my code was ok?
--
Gallon Sylvestre
Kernel developper for Adeneo
Rathaxes core developper
http://www.evilkittens.org/blog/syl