LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-09-2010, 04:07 PM   #1
yousafsajjad
Member
 
Registered: Jun 2010
Posts: 50

Rep: Reputation: 15
Linux->Nasm->Flush ports


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.
 
Old 07-09-2010, 06:03 PM   #2
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
That's because the process does not have permission to access to that IO address. On a traditional PC is the ISA DMA controller, so writing to it is dangerous.

What are you trying to do?
 
Old 07-09-2010, 11:21 PM   #3
yousafsajjad
Member
 
Registered: Jun 2010
Posts: 50

Original Poster
Rep: Reputation: 15
yeah you are right .. i am calling an assembly function from C. So I need to get permission to that port using ioperm() first and than it works.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql "flush logs" or "flush tables with read lock", ... hangs deadeyes Linux - Server 4 01-19-2010 03:24 AM
Installing nasm for linux enduser000 Programming 9 07-30-2008 01:43 PM
LXer: Linux Assemblers: A Comparison of GAS and NASM LXer Syndicated Linux News 0 10-19-2007 11:00 AM
Nasm essoft478 Linux - Software 2 09-13-2004 04:33 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration