TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: KURT KUZBA
from: TIM HUTZLER
date: 1998-01-02 13:13:00
subject: Re: asm CALL doesn`t wor

CM>Salut/Hi Tim Hutzler!
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
KK>I somehow missed this question and only caught the reply.
Ol' FIDO isn't as reliable as it used to be. [grin]
KK>In Borland, you may not use labels within the asm block. The label
KK>must be outside of the block.
ie.
KK>void asm_retrace(void)
KK>{
KK>_asm {
KK>mov dx,3dah
KK>}
KK>retrace:
KK>_asm {
KK>in   al,dx
KK>test al, 8
KK>jz retrace
KK>}
KK>no_retrace:
KK>_asm {
KK>in   al,dx
KK>test al, 8
KK>jnz no_retrace
KK>}
KK>}
KK>A minor inconvenience, really. Apparently, the parser in the
KK>compiler requires nothing but code mnemonics to be in the asm
KK>blocks.
Ah, I see what you mean. I don't use block, but rather simply use
"asm" on each line. I can use conditional jumps without any problem
that wam but I can't use "call" in any way, except via register, ie.
"CALL [BX]" for example.
KK>You can put the labels in there, but the parser will ignore them
KK>unless they are outside of the code blocks.
Okay, I will mess around with these guidelines in mind. Thanks muchly.
KK>It IS some small advantage to code formatting, if that is of any
KK>small comfort, since it makes each labelled block of code as a
KK>separate asm{} block in your source. :) This particular bit of
KK>code was written in QuickC 2.5, and tested in QuickC and Borland
KK>C++ 3.1.
Hmm. That should mean that it would work for me.
again, thanks.
___ Blue Wave/QWK v2.12
--- Maximus/2 3.01
---------------
* Origin: Madman BBS * Chico, California * 530-893-8079 * (1:119/88)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.