Your example is identical to the what I am seeing in this portion of the C code.
Now knowing that this code is probably not portable, what options do I have for performing the same operation?
Would it be best to build a DLL with these two small functions and make a call, or are there libraries out there that are already suffcient for this?
The Inline ASM is very simple, here it is:
Code:
// wait for low
do
{
asm {
xor ax,ax
mov dx,card_addr
in al,dx
mov port_data,ax
}
} while ((port_data & 0x01) == 1);
// wait for high
do
{
asm {
xor ax,ax
mov dx,card_addr
in al,dx
mov port_data,ax
}
} while ((port_data & 0x01) == 0);
How else could I accomplish the same thing??
Thanks again for your specifics, as they have helped me to understand tremendously.