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. mongodb的备忘录

    https://www.cnblogs.com/best/p/6212807.html

  2. #pragma pack (n) 惹的祸

    今天遇到了一个问题,使用数据流传输的数据在解析的时候数据错位.想了非常久,发现是#pragma pack (n)惹的祸. 首先.解析方使用了编译字节设置,可是在发送方没有使用,于是用相同的结构体解析数 ...

  3. Python按行输出文件内容具体解释及延伸

    下面两端測试代码分别为笔者所写,第一段为错误版本号.后者为正确版本号: #! /usr/bin/python2.7 try:     filename = raw_input('please inpu ...

  4. [办公自动化]如何让excel图表标签中显示最新值数据

    同事做了一张excel图表,希望最新的数据显示数据标签,其他都不显示.并且当单元格的数据新增加时,这个标签要能自动更新. 这里需要用到公式,获取到这个最新值.在b2输入公式=lookup(9e+307 ...

  5. linux select poll and epoll

    这里以socket文件来阐述它们之间的区别,假设现在服务器端有100 000个连接,即已经创建了100 000个socket. 1 select和poll 在我们的线程中,我们会弄一个死循环,在循环里 ...

  6. ionic2 在执行ionic serve后报 build dev failed: Cannot set property 'fileSystem' of null

    ionic2 真是烦人,因为环境依赖的问题还有网络的问题,不知砸的,项目放一段事件不运行就会出问题. 我一开始是 用 cnpm install安装的依赖,其中也报了错, 然后执行 ionic serv ...

  7. python2.x里unicode错误问题

    import sys reload(sys) sys.setdefaultencoding('utf8')

  8. presentModalViewController和dismissModalViewControllerAnimated的使用总结

    在实际开发中,如果要弹出视图: 我们常用到presentModalViewController方法和dismissModalViewControllerAnimated方法. presentModal ...

  9. 【POJ 1470】 Closest Common Ancestors

    [题目链接] 点击打开链接 [算法] 离线tarjan求最近公共祖先 [代码] #include <algorithm> #include <bitset> #include ...

  10. WPF获取原始控件样式

    要获取WPF控件的原始样式,需要我们安装Blend for Visual Studio. 然后,我们打开Blend for Visual Studio,创建一个WPF项目. 然后,我们向页面拖动一个B ...