This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re:Q: convert DOS library to linux


In article <5dch00$qoj@halon.vggas.com>, jacek@prosys.wroc.pl says...

>I have some low-level functions  in source (asembler) [direct write and
>read procedures between PC and N-AT module and interrupt processing].
>I think (hope) that there is no int21 (or DOS specific) call in hi-level
>C functions library.

Supposing there isn't, the code still won't work because :
1. (I assume) it's real mode code.
2. User-mode programs under Linux are not allowed to do port IO.
3. User-mode programs under Linux can't hook interrupts.

Read the manual pages for ioperm(2), iopl(2), mem(4), port(4).
There is a HOWTO for this kind of programming under Linux.
It looks like you need to write a device driver.

-- 
James Youngman       VG Gas Analysis Systems |The trouble with the rat-race 
 Before sending advertising material, read   |is, even if you win, you're 
http://www.law.cornell.edu/uscode/47/227.html|still a rat.