Scali
Veteran Member
I have the following code:
Now, for some reason, OpenWatcom complains about an invalid operand for the MACHINE_PCXT value (I ported this code over from Turbo C++ 3.1, where it worked fine).
I guess its problem is that it doesn't know the size of the operand.
But I tried using 'word ptr' or 'byte ptr' to indicate size, and I couldn't make it work.
The only thing that worked was to replace the MACHINE_PCXT with an immediate '0'.
Does anyone have any idea if you can get enums to work inside asm blocks at all, and if so, how?
Code:
typedef enum
{
MACHINE_PCXT,
MACHINE_PCAT,
MACHINE_PS2
} MachineType;
...
MachineType machineType;
_asm {
mov [machineType], MACHINE_PCXT
}
Now, for some reason, OpenWatcom complains about an invalid operand for the MACHINE_PCXT value (I ported this code over from Turbo C++ 3.1, where it worked fine).
I guess its problem is that it doesn't know the size of the operand.
But I tried using 'word ptr' or 'byte ptr' to indicate size, and I couldn't make it work.
The only thing that worked was to replace the MACHINE_PCXT with an immediate '0'.
Does anyone have any idea if you can get enums to work inside asm blocks at all, and if so, how?