-
LSS init_stack,%esp
.
.
.
.file 128,4,0
init_stack:
.long init_stack
.word 0x10
把 init_stack 地址处的内容既init_stack 有效地址给esp,同时把0x10给ss段寄存器
参考了下面一段英文(红色字体部分,Intel Assembly 语法):
LDS, LES, LFS, LGS, LSS: Load Far Pointer
LDS reg16,mem ; o16 C5 /r [8086] LDS reg32,mem ; o32 C5 /r [386] LES reg16,mem ; o16 C4 /r [8086] LES reg32,mem ; o32 C4 /r [386] LFS reg16,mem ; o16 0F B4 /r [386] LFS reg32,mem ; o32 0F B4 /r [386] LGS reg16,mem ; o16 0F B5 /r [386] LGS reg32,mem ; o32 0F B5 /r [386] LSS reg16,mem ; o16 0F B2 /r [386] LSS reg32,mem ; o32 0F B2 /r [386]
These instructions load an entire far pointer (16 or 32 bits of offset, plus 16 bits of segment) out of memory in one go. LDS, for example, loads 16 or 32 bits from the given memory address into the given register (depending on the size of the register), then loads the next 16 bits from memory into DS. LES, LFS, LGS and LSS work in the same way but use the other segment registers.