is/was 用于 x86 实模式的 C 编译器中 __loadds 关键字的含义是什么?
What is/was the meaning of the __loadds keyword in C compilers for x86 real mode?
出于好奇,我已经 运行 进入 __loadds
关键字作为一些旧代码中的函数声明修饰符,用于 16 位 Windows。
A Google search 没有产生任何有用的东西,大概是因为没有人再使用支持该关键字的编译器。我从它的名字猜测它与DS
(数据段)寄存器和x86实模式的分段内存模型有关。
The online documentation for the Digital Mars compiler讲这个函数声明修饰符:
__loadds
This keyword aid those programming Microsoft Windows. __loadds
causes the compiler to load DS
from DGROUP
on entry to the function and to restore DS
on exit.
The -mu
compiler option applies __loadds
to all functions.
请注意,此修饰符已完全过时,仅适用于 16 位 Windows 环境,例如 Windows 3.1.
出于好奇,我已经 运行 进入 __loadds
关键字作为一些旧代码中的函数声明修饰符,用于 16 位 Windows。
A Google search 没有产生任何有用的东西,大概是因为没有人再使用支持该关键字的编译器。我从它的名字猜测它与DS
(数据段)寄存器和x86实模式的分段内存模型有关。
The online documentation for the Digital Mars compiler讲这个函数声明修饰符:
__loadds
This keyword aid those programming Microsoft Windows.
__loadds
causes the compiler to loadDS
fromDGROUP
on entry to the function and to restoreDS
on exit.The
-mu
compiler option applies__loadds
to all functions.
请注意,此修饰符已完全过时,仅适用于 16 位 Windows 环境,例如 Windows 3.1.