Assembly之instruction之MOV
MOV[.W] Move source to destination
MOV.B Move source to destination
Syntax MOV src,dst or MOV.W src,dst
MOV.B src,dst
Operation src −> dst
Description
The source operand is moved to the destination.The source operand is not affected. The previous contents of the destination are lost.
Status Bits Status bits are not affected.
Mode Bits OSCOFF, CPUOFF, and GIE are not affected.
Example The contents of table EDE (word data) are copied to table TOM. The length of the tables must be 020h locations.
MOV #EDE,R10 ; Prepare pointer
MOV #020h,R9 ; Prepare counter
Loop MOV @R10+,TOM−EDE−(R10) ; Use pointer in R10 for both tables
DEC R9 ; Decrement counter
JNZ Loop ; Counter ≠ 0, continue copying
...... ; Copying completed
......
......
Example The contents of table EDE (byte data) are copied to table TOM. The length of the tables should be 020h locations
MOV #EDE,R10 ; Prepare pointer
MOV #020h,R9 ; Prepare counter
Loop MOV.B @R10+,TOM−EDE−(R10) ; Use pointer in R10 for
; both tables
DEC R9 ; Decrement counter
JNZ Loop ; Counter ≠ 0, continue
; copying
...... ; Copying completed
......
......
Assembly之instruction之MOV的更多相关文章
- Assembly之instruction之Indirect Autoincrement Mode
Assembler Code Content of ROMMOV @R10+,0(R11) MOV @R10+,0(R11) Length: One or two words Operation: ...
- Assembly之Instruction之Byte and Word
Byte and word issues The MSP430 is byte-addressed, and little-endian. Word operands must be located ...
- Assembly之instruction之JC
JC Jump if carry setJHS Jump if higher or same Syntax JC label JHS label Operation If C = 1: PC + 2 ...
- Assembly之instruction之JUMP
JMP Jump unconditionally Syntax JMP label Operation PC + 2 × offset −> PC Description The 10- ...
- Assembly之instruction之Register Mode
Assembler Code Content of ROM MOV R10,R11 MOV R10,R11 Length: One or two words Operation: Move the c ...
- Assembly之instruction之CMP
CMP[.W] Compare source and destinationCMP.B Compare source and destination Syntax CMP src,dst or ...
- Assembly之instruction之Status register
The status register (SR/R2), used as a source or destination register, can be used in the register m ...
- How a C++ compiler implements exception handling
Introduction One of the revolutionary features of C++ over traditional languages is its support for ...
- [转]Whirlwind Tour of ARM Assembly
ref:http://www.coranac.com/tonc/text/asm.htm 23.1. Introduction Very broadly speaking, you can divid ...
随机推荐
- C#学习笔记_09_构造方法/函数
09_构造方法/函数 代码案例 作用:构造函数主要是用来创建对象时为对象赋初值来初始化对象:总与new运算符一起使用在创建对象的语句中,例如A a=new A(); 特点: 构造函数具有和类一样的名称 ...
- oracle 增量导出/导入
一. 导出/导入(Export/Import) ---- 利用Export可将数据从数据库中提取出来,利用Import则可将提取出来的数据送回Oracle数据库中去. ---- 1. ...
- 利用fontforge制作自己的字体
最近手伤了,写代码特别慢,索性就干干一些奇奇怪怪的事情. 发现我电脑上的中文字体很是奇怪,于是便去找了中英混合的等宽字体. 满足条件的只找到了YaHei Consolas Hybrid,是微软的Con ...
- sql server使用杂记(二)
存储过程CREATE PROCEDURE [dbo].[getprofitandloss]@agentNo varchar(10),@o0 varchar(30),@source varchar(30 ...
- sql简单优化点滴
select uppagent.agent_no AGENT_NO, ISNULL(countsubagent,0) REFERRAL_AGENT_NUM, ISNULL(countsubcustom ...
- [MongoDB]Python 操作 MongoDB
from pymongo import MongoClient mc = MongoClient('localhost',27017) db = mc.users db.users.save({'na ...
- HDU 5467
第一次写LCT,各种模板加入...以后都只遇到有新意的题目再更新了 这道题就是LCT,但是,难在一个回退的操作.这时,可以通过改变执行顺序,先把要回退后再做的操作先执行了,再回退到之前的执行.这时,建 ...
- CocoaPods建立私有仓库
项目管理:CocoaPods建立私有仓库 2015-05-08 10:22 编辑: lansekuangtu 分类:iOS开发 来源:agdsdl 0 6367 CocoaPods项目管理私有仓库 招 ...
- hdu5044(二分)
题意:一个树上建两个加油站.使得全部点到达其近期加油站的最大距离最小. 解法:二分答案.关键时二分时候,要最合理话布局两个点的位置,做法是处理出来树的直径,然后在直径两端分别向中间移动二分的x步的两个 ...
- Delphi7中单元文件内各个部分的执行顺序
注:本文主要是讨论delphi程序启动时和退出时的执行顺序,期间有些知识来源于Delphi帮助,有些来自<Delphi7程序设计教程>(这本书只告诉我有initialization 和 f ...