Mail Archives: djgpp/2003/07/07/06:31:28
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 -