Hi
I have many DOS clients on my LAN and I need to realize a communication tool based on NETBEUI protocol, does anybody know where i can get examples and source code (in C) ?
Network is working, I can share files among the DOS PC's.
Any help ?
Hi
I have many DOS clients on my LAN and I need to realize a communication tool based on NETBEUI protocol, does anybody know where i can get examples and source code (in C) ?
Network is working, I can share files among the DOS PC's.
Any help ?
You might check out Ralph Brown's Interrupt List. I'm not familiar with that protocol but if its a dos-based driver then it must be interrupt driven. Perhaps the interrupt listing has the information you need. It will most likely use interrupt 2Fh, but there is another standard networking interrupt vector that most companies used. However it slips my mind at this point because I haven't done any DOS programming in over a year.
Thanks,
but I am actually a Java Developer and not familiar with dark, basic hardware implementations.. as a matter of fact I need to code in C for my DOS clients thus I am searching for example code which I can use direclty by modifying the source code.
Thanks again
You need to interface with the Net driver which will be located in upper memory in DOS. In order to 'call' the driver it will reside on an interrupt which you can invoke. Upon invocation the system looks in the IVT (interrupt vector table). The algo is: offset=(interrupt_num*4), segment=(interrupt_num*4)+2. The value at the location in this table is then used to call the interrupt handler which is provided by the driver manufacturer.
You simply need to pass the correct function number in the AX register (most implementations use the AX register as a function selector) and the correct values in the other registers. The registers used and the correct values to put in them are completely dependent on implementation inside the driver so there really is not a standard. The RBIL or interrupt listing by Ralph Brown will provide a wealth of information on many, many, many older network drivers and I'm sure yours is probably in there somewhere.
Here is an example of setting the video mode in C via int 10h. The desired mode is to be put into AX. There are other options available to use for diff cards but all of them support putting the mode number into AX.
This sets the video mode to 320x200x256 1 byte per pixel. It is a palettised mode in that the numbers in the video memory correspond to a pallette table in the video card memory which then correspond to certain RGB values.
In inline asm:Code:#include <dos.h> int main(void) { REGS regs; regs.x.ax=0x13; int86(0x10,®s,®s); //Fill screen with blue //Video memory in graphics modes >=320x200x256 all start at A000:0000 unsigned char far*Screen=(unsigned char far *)MK_FP(0xA000,0); for (unsigned int memloc=0;memloc<64000;memloc++) { Screen[memloc]=1; } return(0); }
Code:#include <dos.h> int main(void) { unsigned char far *Screen=(unsigned char far *)MK_FP(0xA000,0); asm { mov ax,13h int 10h les di,[Screen] mov cx,32000d mov al,0x01 mov ah,0x01 rep stosw } return(0); }
Hehe, writing a protocol stack using inline assembly would be... cumbersome.
I'm sure there are libraries available.
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
But I thought that DOS never had any network access... microsoft first accessed the network with windows.
then how could there be an interupt or a lib?
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
Well thanks for your postings..I don't have the knowledge to implement any interrput stuff, I think that I will try to realize the communication through a database that is located on a shared drive.
I have Microsoft Network Client 3.0 on my DOS PC's, they can all access a shared drive on a Win2000 PC where I will have a database which gets queried by the DOS clients frequently..
All I need now is source code in C that lets me access (execute SQL statements) on a Microsoft Access database.
? ?
Thanks for your replies
Marcel
Just for information.
I found a nice tool for tcp/ip communication for DOS:
http://www.ertos.com/ and http://www.wattcp.com
http_d is kind of a socket (on DOS) that can become access easily e.g. through Java etc..
Works nice !
All you need is a Packet Driver for your NIC
Marcel