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

前端 未结 12 872
清酒与你
清酒与你 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

    This is a variant of Ivan's suggestion but give this a try:

    void foo::bar( void )
    {
        __asm
        {
          mov eax, offset SomeLabel
          // ...
        }
        // ...
        __asm SomeLabel:
        // ...
    }
    

提交回复
热议问题