如果有了assume sg:stack,还需要mov ax,sg;mov ss,ax这样的语句么?
时间:2011-09-17
来源:互联网
我知道assume ds:data的含义,如果mov语句用寄存器寻址[bx],那么这句assume就默认了ds是段寄存器ds:[bx]
但是对于堆栈段我感觉是多余的。因为: 既然sg的定义是:
sg segment
...
那么还需要
mov ax,sg
mov ss,ax
这样的语句么?
----------------------------------------------------
(1) assume了以后,pop/push就是把sg作为堆栈段操作啊
为什么还要设置ss/sp寄存器呢?
(2) -->换句话说,既然有了mov ax,sg; mov ss,ax这两句话,那么已经保证了pop/push不会出错,那还需要在程序头部去assume一下sg呢?
感觉多次一举
但是对于堆栈段我感觉是多余的。因为: 既然sg的定义是:
sg segment
...
那么还需要
mov ax,sg
mov ss,ax
这样的语句么?
----------------------------------------------------
(1) assume了以后,pop/push就是把sg作为堆栈段操作啊
为什么还要设置ss/sp寄存器呢?
(2) -->换句话说,既然有了mov ax,sg; mov ss,ax这两句话,那么已经保证了pop/push不会出错,那还需要在程序头部去assume一下sg呢?
感觉多次一举
作者: asserw 发布时间: 2011-09-17
The "ASSUME segregister:seglocation" syntax is used to inform the
assembler of the current value of <segregister>. The assembler
uses this information to calculate offsets correctly and to guard
against segment selection errors. This directive does not generate
code to change the value of <segregister>. The ASSUME directive is
not necessary for the CS register, since CS is assumed to the
current segment or group automatically. The <seglocation> can be any
segment or group name, or an equivalent expression.
如果问题解决就请及时结帖,谢谢:)
assembler of the current value of <segregister>. The assembler
uses this information to calculate offsets correctly and to guard
against segment selection errors. This directive does not generate
code to change the value of <segregister>. The ASSUME directive is
not necessary for the CS register, since CS is assumed to the
current segment or group automatically. The <seglocation> can be any
segment or group name, or an equivalent expression.
如果问题解决就请及时结帖,谢谢:)
作者: s11ss 发布时间: 2011-09-17
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28