flat assembler
Message board for the users of flat assembler.

flat assembler > Linux > LPT control registers

Author
Thread Post new topic Reply to topic
DustWolf



Joined: 26 Jan 2006
Posts: 373
Location: Ljubljana, Slovenia
Hello,

I am trying to toggle the values around in the LPT (printer / parallel) port registers. Under windows or DOS this would include simply sending OUT to port 0x378 (which in my case IS the parallel port) with the byte as the 8 bits for the registers. However in Linux, that causes a segmentation fault.

I have and array of LEDs hooked up to the LPT port, hence that doesn't do any sort of negotiation with the computer that most other mechanisms for using the LPT port under Linux need... I am out of ideas, how do I solve this (short of rebooting into DOS)?

Thanks in advance.
Post 05 Apr 2006, 10:56
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 212
Location: Budapest, Hungary
check out the man page of 'ioperm' or any of the high level parallel port libraries. Although ioperm is a library function it also has a system call counterpart you can easily use in your assembly programs.
Post 05 Apr 2006, 11:22
View user's profile Send private message Reply with quote
DustWolf



Joined: 26 Jan 2006
Posts: 373
Location: Ljubljana, Slovenia
Endre wrote:
check out the man page of 'ioperm' or any of the high level parallel port libraries. Although ioperm is a library function it also has a system call counterpart you can easily use in your assembly programs.


That works great, thanks!
Post 06 Apr 2006, 19:21
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.