[comp.sys.ibm.pc] Please Help with DOS IOCTL Return Codes

davis@clocs.cs.unc.edu (Mark Davis) (03/13/89)

I am trying to use DOS IOCTL calls for block devices and I am getting
undocumented error codes:
	INT 21,
	AX=440D,
	CH=08 (disk),
	CL=40 (set device parameters).
On return:
	carry Flag=set (error)
	AX=05h (Not listed that I can find)

This program is running on a PS 2 Mod 60 using PC/DOS 3.3.  The logical
disks in question are controlled by the standard PS 2 MFM controller:

Disk number	3	5	4	6	7
Disk letter	C:	E:	D:	F:	G:
Located on a	-ST 4053 -	---- ST 4096 -----

The only return codes listed in the all of the references I can find
are
AX=01h == Bad Command
   02h == Invalid Disk

Both of the disks start out as type 32 (ST 4053).  I am trying to fix
the number of heads for the 4096 and the resulting number of cylinders
in each partition.

When I use CL=60 (to get parameters), there is no error.  But, when I
use CL=40, I get an error (carry set) and AX=05h.  The set parameters
seems to kind of work otherwise.  For example, FORMAT can figure out
the correct disk geometry after this call.  The DOS Disk parameter
block valid byte gets set to F8h after the call (FFh means invalid).

Questions:

1. Does anybody know what the rest of the return codes are.  In
particular, what does AX=5 mean?

2. I seem to remember a recommendation for a book titled something like
"Developers guide to MS DOS" by Microsoft, but I can't confirm the
existence of such a book.  Does anybody know for sure.  An ISBN or MS
product number would be wonderful.

By the way, it is possible to make a PS 2 Model 60 use an ST 4096.
More details to follow.

Thanks - Mark (davis@cs.unc.edu or uunet!mcnc!davis) (919)962-1739

jmv@sppy00.UUCP (Jim Vickroy) (03/15/89)

In article <7211@thorin.cs.unc.edu> davis@cs.unc.edu (Mark Davis) writes:

=>Questions:
=>
=>2. I seem to remember a recommendation for a book titled something like
=>"Developers guide to MS DOS" by Microsoft, but I can't confirm the
=>existence of such a book.  Does anybody know for sure.  An ISBN or MS
=>product number would be wonderful.
=>

I'm not sure about this title but I can recommend three books which discuss
device drivers at various lengths:

    1. Writing MS-DOS Device Drivers
	
       I think the authors last name is Lai.

    2. Advanced MS-DOS

       A Microsoft Press Book.

    3. The MS-DOS Encyclopedia

       Another Microsoft Press book and at a hefty price tag ($125) but for
       anybody doing 'serious' MS-DOS development, it's worth every cent.

Hope this helps

jim
--

!==================================================================!=========!
! Jim Vickroy                          | cbosgd!osu-cis!sppy00!jmv !/././././!
! Online Computer Library Center, Inc. |---------------------------!././././.!
! Dublin, Ohio  43017                  | jmv@sppy00                !/././././!
!------------------------------------------------------------------!././././.!
! "That voodoo stuff don't do nothin' for me"                 -jrr !/././././!
!==================================================================!=========!