JC of the instruction of assembly

Source: Internet
Author: User

JC Jump if carry set
JHS Jump if higher or same

Syntax JC Label

JHS Label

Operation

If C = 1:pc + 2xoffset−> 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 are added to the program counter. If C is reset, the next instruction following the jump is executed. JC (Jump if carry/higher or same) are used for the comparison of unsigned numbers (0 to 65536).

Status Bits

Status bits is not affected.

Example

The P1IN.1 signal is used to define or control of the program flow.

1 BIT #01h, &p1in ; State of signal−> Carry 2 JC ; If Carry=1 Then execute program routine A 3   ; carry=0, execute program here

Example

R5 is compared to 15. If the content is higher or the same, branch to LABEL.

1 CMP #, R52 JHS LABEL  ; Jump is taken if r5≥15 3   ; Continue here if R5 < 

JC of the instruction of assembly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.