Assembly之instruction之JC
2015-07-27 20:19
591 查看
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.
Example
R5 is compared to 15. If the content is higher or the same, branch to LABEL.
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 #15,R5 JHS LABEL ; Jump is taken if R5 ≥ 15 ...... ; Continue here if R5 < 15
相关文章推荐
- mybatis Result Maps对结果分组3--一对多使用limit
- 简略Spark输出
- Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version 错误解决
- 南阳oj 士兵杀敌(二) 题目116 NYOJ 数据结构
- Axure 模糊搜索
- 最简单的基于FFmpeg的移动端例子:IOS HelloWorld
- Linux的常用命令
- 监听ContentProvider中数据的变化
- Jps介绍以及解决jps无法查看某个已经启动的java进程问题
- ADT Bundle下新建安卓项目的同时会新增一个appcompat_v7_n的原因
- HDU 1232--畅通工程【水题,并查集】
- Java多态中的注意事项
- 最小生成树
- oracle启动顺序
- Java基础——集合框架(四)
- POJ Cow Sorting 3270【哈希表+置换群】
- windows线程同步
- IOS的safari浏览器的电话号码识别功能的禁用
- UVA540-Team Queue
- 表单开发(一):获取文本框和密码框数据 用户登录网页