马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
assume cs:code
code segment
dw 0123h,0234h,0345h,0567h,0678h,0789h,089ah,09abh
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
start:
mov ax,cs
mov ss,ax
mov sp,30h
mov bx,0
mov cx,8
s:
push cs:[bx]
add bx,2
loop s
mov bx,0
mov cx,8
s0:
pop cs:[bx]
add bx,2
loop s0
mov ax,4c00h
int 21h
code ends
end start
截取了有疑问的数据。上面是代码。爽哥的。
-t
AX=13D2 BX=0000 CX=0058 DX=0000 SP=0030 BP=0000 SI=0000 DI=0000
DS=13C2 ES=13C2 SS=13D2 CS=13D2 IP=003A NV UP EI PL NZ NA PO NC
13D2:003A B90800 MOV CX,0008
-t
AX=13D2 BX=0000 CX=0008 DX=0000 SP=0030 BP=0000 SI=0000 DI=0000
DS=13C2 ES=13C2 SS=13D2 CS=13D2 IP=003D NV UP EI PL NZ NA PO NC
13D2:003D 2E CS:
13D2:003E FF37 PUSH [BX] CS:0000=0123
-d cs:0
13D2:0000 23 01 34 02 45 03 67 05-78 06 89 07 9A 08 AB 09 #.4.E.g.x.......
13D2:0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
13D2:0020 00 00 00 00 00 00 D2 13-00 00 3D 00 D2 13 D9 0D ..........=..... ;红色的部分是栈空间
13D2:0030 8C C8 8E D0 BC 30 00 BB-00 00 B9 08 00 2E FF 37 .....0.........7
13D2:0040 83 C3 02 E2 F8 BB 00 00-B9 08 00 2E 8F 07 83 C3 ................
13D2:0050 02 E2 F8 B8 00 4C CD 21-00 00 00 00 00 00 00 00 .....L.!........
13D2:0060 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
13D2:0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
-
;没入栈之前怎么会有数据呢,SS=13D2 SP=0030。D2 13-00 00 3D 00 D2 13 D9 0D 这些数据是哪来的。求解.
;初始栈不是为空的么。
00 00 00 00 D2 13 00 00-43 00 D2 13 D9 0D 23 01 入栈之后,数据又变这样了。
-t
AX=13D2 BX=0002 CX=0008 DX=0000 SP=0022 BP=0000 SI=0000 DI=0000
DS=13C2 ES=13C2 SS=13D2 CS=13D2 IP=0051 NV UP EI PL NZ NA PO NC
13D2:0051 E2F8 LOOP 004B
-p
AX=13D2 BX=0010 CX=0000 DX=0000 SP=0030 BP=0000 SI=0000 DI=0000
DS=13C2 ES=13C2 SS=13D2 CS=13D2 IP=0053 NV UP EI PL NZ AC PO NC
13D2:0053 B8004C MOV AX,4C00
-d cs:0
13D2:0000 AB 09 9A 08 89 07 78 06-67 05 45 03 34 02 23 01 ......x.g.E.4.#.
13D2:0010 00 00 00 00 00 00 D2 13-D2 13 00 00 51 00 D2 13 ............Q...
13D2:0020 02 32 9A 08 89 07 78 06-00 00 53 00 D2 13 D9 0D .2....x...S..... ;出栈后
出栈之后栈里面的数据又成这样了。= =#
求解.
|