NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: yousafsajjad on July 09, 2010, 09:07:35 PM
-
Hi,
I am using the following code to flush port:
in al, 081h
out 081h, al
but it is giving me segmentation fault. Does anyone how I can do it.
-
Try sys_ioperm (101?) first. You'll need root permissions to do this. To give your program root permissions, without the "user" having to be root... As root:
chown root:root myprog
chmod +s myprog
I'm not sure what your proposed code is going to do for you, but I think you'll be able to do it without segfault if you do sys_ioperm first...
Best,
Frank
-
you are very right. Thanks for your help.