Borland x86 inlined assembler; get a label's address?

前端 未结 12 973
清酒与你
清酒与你 2021-01-05 03:15

I am using Borland Turbo C++ with some inlined assembler code, so presumably Turbo Assembler (TASM) style assembly code. I wish to do the following:

void foo         


        
12条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-05 03:51

    I think the problem you're running into is that a label inside the __asm block and the label in the C++ code are two completely different things. I wouldn't expect that you could reference a C++ label in that way from inline assembly, but I must say it's been a very long time since I've used Turbo C++.

    Have you tried the lea instruction instead of mov?

提交回复
热议问题