TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: TIM HUTZLER
from: CARLO MOSTI
date: 1997-12-21 10:20:00
subject: Re: asm CALL doesn`t work

Salut/Hi Tim Hutzler!
 TH> I do a lot of inline assembly programming, but I haven't found a way
 TH> to use the CALL with my Borlans 3.0 compiler. The error message is
 TH> "undefined symbol" But the symbol is there.
 TH> asm JMP sk_a
 TH> MyLabel: asm ... asm RET
 TH> sk_a:
 TH> asm ...
 TH> asm CALL MyLabel //get error "undefined symbol: MyLabel"
 TH> asm ...
 TH> Writing subs to call is a challenge. It seems that i have to jump
 TH> around code in the same function. I don't know how to call an
 TH> assembly subroutine outside the function. Any info on how to treat
 TH> this issue is appreciated.
        Well, correct me if I'm wrong, but it seems you're calling a
label instead of a procedure the way it's written. If MyLabel was
meant to be a procedure, what I suppose is the case since you're
calling MyLabel instead of jumping to it, then write it as a
normal C procedure containing the assembly lines like this:
 void MyLabel(); 
 void main()
 {
    asm   ...
    MyLabel();  // instead of a call
    asm   ...
 }
 void MyLabel()
 {
    asm   ...
    asm   ret
 }
        Hope it helps!
        See ya!
--- GEcho 1.11+
---------------
* Origin: -=[ POPA SBE // Ste-Therese // 430-0251 * 430-1524 ]=- (1:242/801)

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™.