hi all

i'm not leaving win32 for linux :) i'm just writing in a fast fashon a sw for a little eprom programmer i've build and i would it works fast, to come back to my win32 projects :)

so in a cpp file i'm doing

__asm ("pusha ;"
"mov $0x378, %dx ;"
"xor %eax, %eax ;"
"outb %al, %dx ";

etc etc )

the line with out cause a crash "segmentation fault". Is possible that the kernel don't allow outb and inb ?

Other question... anyone know how i can use some #define values into the asm code ?
Posted on 2004-01-18 03:19:04 by Bit7
Seg fault on out? Odd. What is the actual message? OTOH, I see that the semicolon is outside of the string in outb line. Is it a typo during post, or is it real?

BTW, all low level stuff should be done in the device driver. An analogy (not quite good, but...) to NT family may help you understand whether you can access the hardware port directly.
Posted on 2004-01-18 03:32:33 by Starless