Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly x86 > asm+C I am doin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 4482 of 4821
Post > Topic >>

asm+C I am doing a bad thing?

by syl <spamtrap@[EMAIL PROTECTED] > Jan 9, 2008 at 12:44 AM

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
 




 5 Posts in Topic:
asm+C I am doing a bad thing?
syl <spamtrap@[EMAIL   2008-01-09 00:44:49 
Re: asm+C I am doing a bad thing?
Frank Kotler <spamtra  2008-01-09 13:58:52 
Re: asm+C I am doing a bad thing?
"Wolfgang Kern"  2008-01-09 16:18:28 
Re: asm+C I am doing a bad thing?
Frank Kotler <spamtra  2008-01-11 01:29:55 
Re: asm+C I am doing a bad thing?
syl <spamtrap@[EMAIL   2008-01-09 08:25:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 6 16:55:30 CDT 2008.