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的更多相关文章

  1. Assembly之instruction之JUMP

    JMP  Jump unconditionally Syntax   JMP  label Operation PC + 2 × offset −> PC Description The 10- ...

  2. Assembly之instruction之Indirect Autoincrement Mode

    Assembler Code Content of ROMMOV @R10+,0(R11)   MOV @R10+,0(R11) Length: One or two words Operation: ...

  3. Assembly之Instruction之Byte and Word

    Byte and word issues The MSP430 is byte-addressed, and little-endian. Word operands must be located ...

  4. Assembly之instruction之Status register

    The status register (SR/R2), used as a source or destination register, can be used in the register m ...

  5. Assembly之instruction之Register Mode

    Assembler Code Content of ROM MOV R10,R11 MOV R10,R11 Length: One or two words Operation: Move the c ...

  6. Assembly之instruction之MOV

    MOV[.W]   Move source to destinationMOV.B Move source to destination Syntax MOV  src,dst  or       M ...

  7. Assembly之instruction之CMP

    CMP[.W]  Compare source and destinationCMP.B  Compare source and destination Syntax  CMP src,dst or ...

  8. BitHacks

    备份文件时看到的.我以前居然下过这东西. 2016-12-4 12:05:52更新 纯文本格式真棒.假如使用word写的我能拷过来格式还不乱?? Markdown真好. Bit Hacks By Se ...

  9. Bit Twiddling Hacks

    http://graphics.stanford.edu/~seander/bithacks.html Bit Twiddling Hacks By Sean Eron Andersonseander ...

随机推荐

  1. X-pack-6.2.4破解

    1.前言: X-pack是elasticsearch的一个扩展包,将安全,警告,监视,图形和报告功能捆绑在一个易于安装的软件包中,虽然x-pack被设计为一个无缝的工作,但是你可以轻松的启用或者关闭一 ...

  2. windows 7 忘記密碼,用“带命令行的安全模式”

    net user administrator /active:yes net user tester /add net localgroup administrators tester /add

  3. keepalived + lvs marster 与 backup 之间的 高可用

    简介 keepalived 是linux下一个轻量级的高可用解决方案,它与HACMP实现功能类似,都可以实现服务或者网络的高可用,但是又有差别:hacmp是一个专业的.功能完善的高可用软件,它提供了H ...

  4. 基于 Web 的 Go 语言 IDE - Wide 1.1.0 公布!

    公布 1.1.0 这个版本号改进了非常多细节,已经全然能够用于正式项目的开发 同一时候我们上线了 Wide 在线服务 到眼下,我们提供了 Wide 和 Solo 两个在线服务,详情请看这里. Wide ...

  5. 【bzoj3609】[Heoi2014]人人尽说江南好

    可以算出合并多少次. #include<algorithm> #include<iostream> #include<cstdlib> #include<cs ...

  6. 【HNOI模拟By YMD】move

    Description 设P(n)为从(0,0)移动到点(n,0)的不同路径数目,移动的方式有以下三种:(x,y)->(x+1,y-1),(x,y)->(x+1,y),(x+y)-> ...

  7. Bootstrap 模态窗口源码分析

    前言: bootstrap的 js插件的源码写的非常好,也算是编写jquery插件的模范写法,本来还想大篇详细的分析一下呢,唉,没时间啊,很早之前看过的源码了,现在贴在了博客上, 300来行的代码,其 ...

  8. Robot Framework 怎样写好Test Case

    1.介绍 这是一个关于如何用Robot Framework写好Test Case的高层次的指导准则 怎样实际的与系统进行交互不在此文档范围内 最重要的准则是使测试用例尽可能的让熟悉此领域的人觉得简单易 ...

  9. JButton的setRollover出现的奇怪问题

    设置了setRollover,可以正常出现状态但是却不会回到默认状态. 研究了一下才发现,repaint的时候不会清除背板而是覆盖上去的, 所以如果原图是透明图就会出现状态不变的情况

  10. bzoj4031 [HEOI2015]小Z的房间——矩阵树定理

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4031 矩阵树定理的模板题(第一次的矩阵树定理~): 有点细节,放在注释里了. 代码如下: # ...