[comp.dcom.lans] Microsoft C calls to Novell 2.11 SFT

rfarris@serene.CTS.COM (Rick Farris) (10/04/88)

This is a question about interfacing to Novell 2.11 SFT from Microsoft C.

After having problems with more complicated functions, I decided to try
a very simple function call.  This one is function # DBh (219), which is
supposed to return the number of local disks in the AL.  Here's the code,
which causes my computer to die.

#include <dos.h>

union REGS inreg;

main()
{
	inreg.h.al = 0xdb;
	intdos(&inreg, &inreg);
	printf("al = %d\n", inreg.h.al);
}

Pretty simple, eh?  How come it doesn't work?  The computer locks up in the
middle of the intdos call...

Rick Farris            rfarris@serene.cts.com     voice         (619) 259-6793
POB M                          KCBIW              public access       259-7757
Del Mar CA 92014      ...!uunet!serene!rfarris    serene.uucp         259-3704

kory@avatar.UUCP (Kory Hamzeh) (10/07/88)

In article <267@serene.CTS.COM>, rfarris@serene.CTS.COM (Rick Farris) writes:
> 	inreg.h.al = 0xdb;

Shouldn't the function value 0xdb be put in the ah register as opposed to the
al register? Thats the way dos works.



-- 
-------------------------------------------------------------------------------
Kory Hamzeh			    UUCP:     ..!uunet!psivax!quad1!avatar!kory
				    INTERNET: avatar!kory@quad.com

brown@hpccc.HP.COM (Jeffrey L. Brown) (10/11/88)

/ hpccc:comp.dcom.lans / kory@avatar.UUCP (Kory Hamzeh) /  5:18 pm  Oct  6, 1988 /
In article <267@serene.CTS.COM>, rfarris@serene.CTS.COM (Rick Farris) writes:
> 	inreg.h.al = 0xdb;

>Shouldn't the function value 0xdb be put in the ah register as opposed to the
>al register? Thats the way dos works.
>
>
>
>-- 
>-------------------------------------------------------------------------------
>Kory Hamzeh			    UUCP:     ..!uunet!psivax!quad1!avatar!kory
>				    INTERNET: avatar!kory@quad.com

It's been a few months since I last wrote Microsoft C Code for Netware.  Where
I worked we were using V2.10.  Every Netware call I ever saw used the AH
register for passing the function code.  Considering that Novell seems to
develop a new way to use functions at every release, this little bit of
commonality (sp?) was amazing.  Since changing registers for the function call
would more than likely break a lot of software, I'm willing to bet, though,
that inreg.h.al should be inreg.h.ah.  Now the big question:  are you sure
that 0xdb is a function code and not a "sub-function selector"?  A lot of the
older (ie., non-packet) calls used al to specify a "sub-function" (I guess
that's as good a name as any; I don't know what it's actually called....)

Like I said, I used to write netware code with Microsoft C V5.0, but I haven't
done so in 2 months (new job), and I don't know how much the API in 2.11 (or
2.15) has changed.  Take all this with a beach (lots of grains :-) ) of salt.

Jeff Brown
brown%hpccc@hplabs.hp.com
...hplabs!hpccc!brown