CM> Salut/Hi Tim Hutzler!
CM>
TH> I do a lot of inline assembly programming, but I haven't
TH> found a way to use the CALL with my Borlans 3.0 compiler.
TH> The error message is "undefined symbol" But the symbol is
TH> there.
TH> asm JMP sk_a
TH> MyLabel: asm ... asm RET
I somehow missed this question and only caught the reply.
In Borland, you may not use labels within the asm block.
The label must be outside of the block.
void asm_retrace(void)
{
_asm {
mov dx,3dah
}
retrace:
_asm {
in al,dx
test al, 8
jz retrace
}
no_retrace:
_asm {
in al,dx
test al, 8
jnz no_retrace
}
}
A minor inconvenience, really. Apparently, the parser in the
compiler requires nothing but code mnemonics to be in the asm
blocks. You can put the labels in there, but the parser will
ignore them unless they are outside of the code blocks.
It IS some small advantage to code formatting, if that is of
any small comfort, since it makes each labelled block of code
as a separate asm{} block in your source. :)
This particular bit of code was written in QuickC 2.5, and
tested in QuickC and Borland C++ 3.1.
---
> ] So far, nobody has ever wanted to ride the Unicorn twice....
---
---------------
* Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)
|