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.
我试图了解一些为 MS DOS 编写的程序。指令 mov ax, ds:4Ch 是移动 ds*16 + 4Ch 的值还是移动存储在地址 ds*16 + 4Ch 的值?
这是一个内存操作数,因为它使用ds:. MASM 风格的 Intel 语法不需要[]内存操作数。
ds:
[]
此外,没有一条机器指令可以计算整数寄存器中的线性地址。分段的重点是处理对于单个寄存器来说太大的线性地址。如果您处于实模式(其中段寄存器值是基数,例如mov ax, ds/ shl ax, 4),您可以手动执行此操作,但如果段寄存器值只是一个选择器,则不那么容易。286/386 保护模式或虚幻模式。
mov ax, ds
shl ax, 4
lea ax, [es: bx + si + 12]例如只处理偏移量计算,忽略段基数。
lea ax, [es: bx + si + 12]