chenlin7978580 发表于 2011-10-7 22:24:02

检测点6.1(2)的问题。

原指令:assume cs:codesg
codesg segment
    dw 0123h,0456h,0789h,0abch,0defh,0fedh,0cbah,0987h
    dw 0,0,0,0,0,0,0,0,0,0
start:
    mov ax,cs   ;cs为所填第一空
    mov ss,ax
    mov sp,24h    ;此条指令为所填第二空
    mov ax,0
    mov ds,ax
    mov bx,0
    mov cx,8
s:
    push
    pop cs:    ;此条指令为所填第三空
    add bx,2
    loop s
   
    mov ax,4c00h
    int 21h
codesg ends
end start
我想问下第3空前一条指令 push 把数据是不是放栈里了?!为什么pop cs:后 数据就存到CS的指定位置了呢???

后知淡然 发表于 2011-10-8 09:02:07

将栈中当前SP所指的内容弹出到某个寄存器 or 段寄存器 or 内存单元

chenlin7978580 发表于 2011-10-9 17:29:46

理解了,谢你的回复啊:lol

504608832 发表于 2011-10-11 10:41:16

因为 cs:codesg
数据段是安放在 cs是,所以 push 都是在代码段内的开辟的内存空间,故出栈就是
pop cs:
页: [1]
查看完整版本: 检测点6.1(2)的问题。