Please excuse the slight off topic question. I am trying to use bcc for a
couple of small routines. There needs to be some assembly in it, and I
need to pass arguments back and forth. I tried the following:
#define BDOOR_MAGIC 0x564D5868
#define BDOOR_CMD_GETVERSION 10
#define BDOOR_PORT 0x5658
typedef unsigned short uint16;
typedef unsigned uint32;
void
getVersion(version, magic)
uint32 *version; uint32 *magic;
{
uint32 v;
uint32 m;
#asm
push eax
push ebx
push ecx
push edx
mov eax, BDOOR_MAGIC
mov ecx, BDOOR_CMD_GETVERSION
mov dx, BDOOR_PORT
in eax, dx
mov v, eax
mov m, ebx
pop edx
pop ecx
pop ebx
pop eax
#endasm
*version = v;
*magic = m;
}
But this returns and no symbol for v and m. Could someone be kind enough
to show me how to pass varibles from c to assembly and back?
TIA,
--Stacy