Jump Instructions
Short jump instruction AJMP addr11
PC←addr11, jump range 2k
Long jump instruction LJMP addr16
PC←addr16, jump range 64k
Indirect jump instruction JMP @A+DPTR
PC←(A)+(DPTR)
Relative transfer instruction SJMP rel
Conditional branch instructions
JZ rel ;(A)=0,transfer
JNZ rel ; (A) ≠ 0, transfer
JC rel ; if C=1, transfer
JNC rel ; if C=0, transfer
JB bit, rel; if bit=1, transfer
JNB bit, rel; if bit=0, transfer
JBC bit, rel; if bit=1, transfer and bit=0
Compare Not Equal Jump Instruction
CJNE A, #data, rel; (A)=#data, continue C←0 (A)>#data, transfer to C←0 (A)<#data, transfer to C←1
Features: Only when <, C←1
CJNE A, direct, rel
CJNE Rn,#data,rel
CJNE @Ri, #data,rel
Decrement 1, if not equal to 0, jump instruction
DJNZ Rn, rel ;
DJNZ direct, rel
Example: Delay subroutine
delay: MOV R7, #03H
delay0: MOV R6, #19H
delay1: DJNZ R6, delay1
DJNZ R7, delay0
RET
Call subroutine instruction
Short call instruction ACALL addr11
Long call instruction LCALL addr16
Subroutine return instruction RET
Interrupt return instruction RETI
No operation instruction NOP
Previous article:Distributed wireless gas monitoring device based on single chip microcomputer
Next article:51 MCU assembly language: What are the bit operation instructions?
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- [Synopsys IP Resources] CDC Verification: One of the Biggest Challenges in Multi-Billion-Gate ASIC Design
- Want to buy Dahua DH-PHSA1.2-SH and DH-PHSA1.5-SH LED modules
- Microphone sound signal extraction and processing
- 5G will change the way we surf the Internet. Will each of us have a small base station?
- Learning to use FPGA to implement video and image processing design
- [Review of SGP40] Rapid deployment of AI ambient air quality tracking model #1 Unboxing
- What is a NB-IoT card?
- [RVB2601 Creative Application Development] Part 2 Development Preparation 2 (Development Environment Setup and Helloworld Example)
- Comparison of technical performance between 433MHz solution and 2.4G, micro-power, and direct sequence spread spectrum solutions
- EEWORLD University Hall----Mathematical Linear System Theory