Assembly之instruction之JC
JC Jump if carry set
JHS Jump if higher or same
Syntax JC label
JHS label
Operation
If C = 1: PC + 2 × offset −> PC
If C = 0: execute following instruction
Description
The status register carry bit (C) is tested. If it is set, the 10-bit signed offset contained in the instruction LSBs is added to the program counter. If C is reset, the next instruction following the jump is executed. JC (jump if carry/higher or same) is used for the comparison of unsigned numbers (0 to 65536).
Status Bits
Status bits are not affected.
Example
The P1IN.1 signal is used to define or control the program flow.
BIT #01h,&P1IN ; State of signal −> Carry
JC PROGA ; If carry=1 then execute program routine A
...... ; Carry=0, execute program here
Example
R5 is compared to 15. If the content is higher or the same, branch to LABEL.
CMP #,R5
JHS LABEL ; Jump is taken if R5 ≥ 15
...... ; Continue here if R5 < 15
Assembly之instruction之JC的更多相关文章
- Assembly之instruction之JUMP
JMP Jump unconditionally Syntax JMP label Operation PC + 2 × offset −> PC Description The 10- ...
- 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之Status register
The status register (SR/R2), used as a source or destination register, can be used in the register m ...
- 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之MOV
MOV[.W] Move source to destinationMOV.B Move source to destination Syntax MOV src,dst or M ...
- Assembly之instruction之CMP
CMP[.W] Compare source and destinationCMP.B Compare source and destination Syntax CMP src,dst or ...
- BitHacks
备份文件时看到的.我以前居然下过这东西. 2016-12-4 12:05:52更新 纯文本格式真棒.假如使用word写的我能拷过来格式还不乱?? Markdown真好. Bit Hacks By Se ...
- Bit Twiddling Hacks
http://graphics.stanford.edu/~seander/bithacks.html Bit Twiddling Hacks By Sean Eron Andersonseander ...
随机推荐
- CentOS 6.9正式版下载
2017-04-07 ,CentOS 6.9正式发布,带来了诸多改进,具体如下. CentOS 6.9重大改进: — 不再有LiveCD,用户可将LiveDVD复制到USB key,在需要时使用: ...
- Android Wear - App Structure for Android Wear(应用结构)
---------------------------------------------------------------------------------------------------- ...
- 手动脱RLPack壳实战
作者:Fly2015 吾爱破解论坛培训第一课选修作业练习的第7题. 这个壳没听说过.可是脱起来比較简单.依据ESP定律就可以直达光明,Dump出原来的程序. 老规矩.首先对须要脱壳的程序进行查壳处理. ...
- 基于Office 365 无代码工作流分析-数据源的建立!
标准操作步骤 下面整个步骤我们是以嘉昊信息的招聘过程的整个流程为一个场景,整个的流程场景的步骤例如以下: 整个的过程,我们通过Infopath 进行对应的表单流转,然后利用Sharepoint ...
- 1.1 Spring概述
Spring是分层的Java SE/EE应用一站式的轻量开源框架,以 反转控制(Inverse of Control,IoC).面向切面编程(Aspect Oriented Programmi ...
- iOS单例设计模式具体解说(单例设计模式不断完好的过程)
在iOS中有非常多的设计模式,有一本书<Elements of Reusable Object-Oriented Software>(中文名字为<设计模式>)讲述了23种软件设 ...
- js坑爹笔试题目汇总(持续更新中)
把你的面试官问倒,你就是一个合格的面试者了,以下总结一些易错的js笔试题目,会持续更新中.欢迎关注 1,考察this var length = 10 function fn(){ alert(this ...
- python开发【第1篇】【基础知识】
1.python解释执行原理 python代码——字节码——机器码——计算机 每次运行都要进行转换成字节码,然后再有虚拟机把字节码转换成机器语言,最后才能在硬件上运行. 2.python编码 unic ...
- 2016/1/12 String 笔记整理
String 简介 文件名 Teststring 有实例 String类 即字符串类型,并不是Java的基本数据类型,但可以像基本数据类型一样使用,用双 ...
- python 矩阵
python的numpy库提供矩阵运算的功能,因此我们在需要矩阵运算的时候,需要导入numpy的包. 1.numpy的导入和使用 from numpy import *;#导入numpy的库函数 im ...