首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

问一下ADDAB/ADDAH指令问题,谢谢

问一下ADDAB/ADDAH指令问题,谢谢

问一下ADDAB/ADDAH指令问题:
书上例子写着:ADDAB .D1 A4,A2,A4
执行前:A2=0000000BH,A4=00000100H,AMR=00020001H
执行后:A2=0000000BH,A4=00000103H,AMR=00020001H
ADDAH .D1 A4,A2,A4
执行前:A2=0000000BH,A4=00000100H,AMR=00000000H
执行后:A2=0000000BH,A4=00000106H,AMR=00000000H
为什么呀,小弟有点不明白?,特此请教!谢谢! [em08]
我也想知道啊,有高人指点吗
我也不是很懂啊!~呵呵


DSP+CPLD+单片机学习板 特价:480元
多功能红外单片机开发板 特价:180元
TMS320vc5502最小系统板(DSP5502开发板) 290元
USB2.0增强型DSP仿真器 特价:880元
ARM仿真器 特价:880元

QQ:342665334
Email:wen_zl@163.com
淘宝网店:http://shop33496317.taobao.com/
中国DSP网: http://www.chinadsp.cn/ (现有大量空板免费赠送活动,呵)
淘宝:http://shop33496317.taobao.com/ 主营:各类开发工具开发板 DSP+CPLD+单片机学习板 仅售:480元 多功能红外单片机开发板 仅售:180元 QQ:342665334 email:wen_zl@163.com 中国DSP网:http://www.chinadsp.cn/

继续问这个问题,有人会吗?

[em01]

ADDAB (.unit) src2, src1, dst

src1 is added to src2 using the byte addressing
mode specified for src2. The addition defaults to linear mode. However, if src2
is one of A4−A7 or B4−B7, the mode can be changed to circular mode by
writing the appropriate value to the AMR .The
result is placed in dst.

AMR:

1−0 A4 MODE 0−3h Address mode selection for register file A4.
            0  Linear modification (default at reset)
            1h Circular addressing using the BK0 field
            2h Circular addressing using the BK1 field
            3h Reserved

ADDAB .D1 A4,A2,A4

ADDAB (.unit) src2, src1, dst

src1 is added to src2 using the byte addressing
mode specified for src2. The addition defaults to linear mode. However, if src2
is one of A4−A7 or B4−B7, the mode can be changed to circular mode by
writing the appropriate value to the AMR .The
result is placed in dst.

AMR:

1−0 A4 MODE 0−3h Address mode selection for register file A4.
            0  Linear modification (default at reset)
            1h Circular addressing using the BK0 field
            2h Circular addressing using the BK1 field
            3h Reserved

ADDAB .D1 A4,A2,A4

A2=0000000BH(A2[0-1]==3),src2==A4-->A4[0-1]=3,the mode changed...and the result is placed in dst(A4).in other words,if(src2==[A4-A7,B4-B7]){A4'[0-1]=A2[0-1];A4=A4';}

[此贴子已经被作者于2007-5-21 16:30:15编辑过]

返回列表