Quote:
> hi! i'm trying to implement asm function 7305h of interrupt 21h in my C++
> program, and I just can't do it. first problem is that I have to use
> structure:
> DISKIO STRUC
> diStartSector dd ? ;sector number to start
> diSectors dw ? ;number of sectors
> diBuffer dd ? ;address of buffer
> DISKIO ENDS
The inline assembler doesn't allow you to define variables or data
structures. It does generally know how to access simple variables and
structures defined in C/C++.
Your bigger problem is that VC/C++ only generates 32 bit code segments.
Neither 9x nor NT will permit a 16 bit interrupt to take place in a 32 bit
code segment. 16 bit ISRs put the address of the return instruction into IP
and 32 bit ISRs set EIP. That's a quick trip to hyperspace.
You can either find a 16 bit compiler - I think that Borland still makes
on - to generate a 16 bit segment to run on 9x or in NT's compatibility mode
though NT is a bit 'picky' about letting you get close to the hardware.
You should take a step back, describe what you want to do and not how to do
it and someone here may propose a modern approach.
Regards.
Will