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 ...
随机推荐
- STM32_NVIC寄存器详解
在MDK内,与NVIC相关的寄存器,MDK为其定义了如下的结构体: typedef struct { vu32 ISER[2]; //2个32位中断使能寄存器分别对应到60 ...
- bug的分类和等级
一.bug的定义 软件的bug,狭义指软件程序的漏洞或缺陷,广义指测试工程师或用户提出的软件可改进的细节.或与需求文档存在差异的功能实现等 对应三个测试目的:(3个为了) 1.为了发现程序的代码或业务 ...
- hdu2012 素数判定【C++】
素数判定 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submis ...
- ReportNG 替换testng获得测试报告
1.导入reportng相关jar包
- 背包again
Gy最近学习了01背包问题,无聊的他又想到了一个新的问题,给定n个物品的价值,和01背包一样,每个物品只能选1次或0次,求最小不能被得到的价值. 输入 第一行一个正整数T(T <= 100),表 ...
- MyBatis 3实现时间段精确的查询(转)
效果如下: 说明: 时间范围的查询会存在以下问题: 1.如果单纯采用年月日的形式会出现缺少最后一点的数据,比如要查询2015-09-16到2015-09-17,那么2015-09-17 01:00:0 ...
- Jmeter压测问题_Non HTTP response code: java.net.ConnectException
负载机压测,线程500,服务器根本无压力,负载机本身发的请求都是失败的 Sample result如下: Thread Name: 考勤(考勤提交) 1-255 Sample Start: 2018- ...
- Golang Template source code analysis(Parse)
This blog was written at go 1.3.1 version. We know that we use template thought by followed way: fun ...
- oc34--instancetype和id的区别
// Person.h #import <Foundation/Foundation.h> @interface Person : NSObject @property int age; ...
- Codeforces--630D--Hexagons(规律)
D - Hexagons! Crawling in process... Crawling failed Time Limit:500MS Memory Limit:65536KB ...