delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/07/07/06:31:28

From: Andrew <andnews AT ihug DOT com DOT oz DOT au>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ASPI issue
Date: Mon, 07 Jul 2003 20:16:17 +1000
Organization: ECLiPSE
Lines: 43
Message-ID: <cqhigv06liof10fts2e30fe7tvnhrhrf0n@4ax.com>
References: <rp2ggv8td86e7230fvjb6s0map4lb7274l AT 4ax DOT com>
NNTP-Posting-Host: p1308-apx1.syd.ihug.com.au
Mime-Version: 1.0
X-Trace: lust.ihug.co.nz 1057572980 10047 203.173.139.38 (7 Jul 2003 10:16:20 GMT)
X-Complaints-To: abuse AT ihug DOT co DOT nz
NNTP-Posting-Date: Mon, 7 Jul 2003 10:16:20 +0000 (UTC)
X-Newsreader: Forte Agent 1.93/32.576 English (American)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

This should help a bit, but is not all of the info you need.
>typedef struct {
>	unsigned char commandCode;
>	unsigned char commandStatus;
... SNIP..
>	unsigned char reserved2[ 34 ];
>	unsigned char cdb[ 6 ];
>	unsigned char sense[ SENSE_LENGTH ];
>} srbCdb6;
This structure may need to be packed. See the FAQ for how to pack a
structure.

>	callback_info.pm_offset = (long)Aspi;
>	_go32_dpmi_allocate_real_mode_callback_retf(&callback_info,
>&callback_regs);
>	
>	rg.x.ax = 0x4402;		/* IOCTL in */
>	rg.x.bx = handle;
>	rg.x.cx = 4;
>	rg.x.es = callback_info.rm_segment;
>	rg.x.dx = callback_info.rm_offset;
>	__dpmi_int(0x21, &rg);
>	
>	close( handle );
>	
>	return( 0 );
>}
>
>And when I try to use Aspi(srb) I have a seg fault. I assume it's
>because either srb should be in Dos memory, but i've copied it in __tb
>and it crashed as well, or Aspi is not well defined, or there is
>something else I didn't catch.
Did you look at Ralph Brown's Interrupt list for what the 0x4402 call
needs and what is returned. Make sure you get it from Raph's home page
links as there are allot of very old versions out there. I can't
rember the URL.

It may be usefull to download the DJLS203.zip or DJLS204.ZIP and see
if there are any similar int 21calls so you can see how the LIBC does
it. This is a long shot, but may help.

Andrew

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019