Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > IBM PC Networking

Source code for controlling ethernet card in DOS?

Reply
 
Thread Tools Display Modes
  #1  
Old 10-26-2007, 10:14 AM
Default Source code for controlling ethernet card in DOS?



We control machines with PC-machines, DOS, C/C++ and lightbus I/O-
card.
We are using the 'main' IRQ to get a interrupt where we do stuff that
are time 'dependant'.
It's hard to use ordinary drivers and interrupt when we 'disturb' the
system like we do.
We would like to add a ethernet card (LAN RTL8100D) and, for starters,
communicate between two computers. (No real network)
Does anyone know of some source code for easy, direct access to the
ethernet card? Without interrupts? Polling.
Do you think it's impossible to achieve?
We do not have very much RAM left either. :-)



Jonas.L.Larsson@gmail.com
Reply With Quote
  #2  
Old 10-29-2007, 01:11 PM
R.Wieser
Guest
 
Posts: n/a
Default Re: Source code for controlling ethernet card in DOS?

<(E-Mail Removed)> schreef in berichtnieuws
(E-Mail Removed) om...

<snip>

> Does anyone know of some source code for easy, direct access
> to the ethernet card? Without interrupts? Polling.


There is none I know of. Packet-driver software is tailored to specific
hardware. If you would want to "poll" that card you would need software
again tailored to that specific hardware. And as your request is quite
un-common probably noone has taken the time to write and publish such code.

But maybe you could simply use such packet-driver software and make sure
that the time spend in the interrupt (when receiving a packet) is as short
as you can get it. For example, by simply letting the driver-software store
the packet-data into a buffer, and than set a flag that the buffer is full.
Than you can poll that flag any way you like.

> Do you think it's impossible to achieve?


The "no interrupt" part ? Not impossible perhaps, just not feasible (you
would (probably) need to disassemble the cards packet-driver to know how to
address the hardware, and than write your own driver).

> We do not have very much RAM left either. :-)


I don't know what "not very much" means, but a file-transfer program that
relies on a packet-driver can be smaller than 5 KByte (inclusive the used
packet-buffer). It won't be fast, but will definitily work.

Regards,
Rudy Wieser



Reply With Quote
  #3  
Old 10-29-2007, 04:21 PM
Patrick Klos
Guest
 
Posts: n/a
Default Re: Source code for controlling ethernet card in DOS?

In article <(E-Mail Removed). com>,
<(E-Mail Removed)> wrote:
>We control machines with PC-machines, DOS, C/C++ and lightbus I/O-
>card.
>We are using the 'main' IRQ


What do you mean by "main IRQ"? There is no "main IRQ".

>to get a interrupt where we do stuff that
>are time 'dependant'.


How "time dependent"? Are you worried about milliseconds or microseconds?
How many? And why is your code so time dependent?

>It's hard to use ordinary drivers and interrupt when we 'disturb' the
>system like we do.


We need details. What do you mean when you say "we disturb the system
like we do"? Interrupt processing doesn't "disturb" the system - it's the
normal way hardware is dealt with.

>We would like to add a ethernet card (LAN RTL8100D) and, for starters,
>communicate between two computers. (No real network)


You mean 2 machines/cards connected with a cross-over cable? No hubs or
switches, right?

And how did you pick your ethernet card? There are plenty of cards that
are probably easier to write code for than the RTL8100. Is that what's on
your motherboard??

>Does anyone know of some source code for easy, direct access to the
>ethernet card? Without interrupts? Polling.
>Do you think it's impossible to achieve?


Sure, if you can find the programmer's guide for the RTL8100 (check
Realtek's web site).

>We do not have very much RAM left either. :-)


How much RAM does your system have, and how much is used? Are you using
a 16-bit DOS? Have you tried setting up EMM or other such tricks?

Patrick
========= For LAN/WAN Protocol Analysis, check out PacketView Pro! =========
Patrick Klos Email: (E-Mail Removed)
Klos Technologies, Inc. Web: http://www.klos.com/
================================================== ==========================
Reply With Quote
Reply

Tags
card, code, controlling, dos, ethernet, source

Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump


All times are GMT. The time now is 11:12 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.