Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图用 C++ 编写操作系统的基础。为了管理中断,我不得不编写一些 asm 行,它们使用在 asm 中声明的外部 C++ 代码external name_of_the_function。我将其中一个函数放在一个类中,但我不知道如何从程序集中访问类方法(external Class::method不起作用)。我发现这样做的唯一方法是创建一个调用类方法的函数,但是是否可以从程序集中直接访问该方法?(假设这些方法是静态的)
external name_of_the_function
external Class::method
external
global
this