MCU instruction function list
MOV A,Rn E8~EF Register A
MOV A,direct E5 direct byte to A
MOV A,@Ri ER~E7 Indirect RAM to A
MOV A,#data 74 data immediately sends data to A
MOV Rn,A F8~FF A sends register
MOV Rn,dircet A8~AF dircet Direct byte to register
MOV Rn,#data 78~7F data immediately sends data to register
MOV dircet,A F5 dircet A sends direct byte
MOV dircet,Rn 88~8F dircet register sends direct byte
MOV dircet1, dircet2 85 dircet1 dircet2 Direct byte to direct byte
MOV dircet,@Ro 86~87 Indirect RAM sends direct bytes
MOV dircet,#data 75 dircet data Immediate data to direct byte
MOV @Ri,A F6~F7 A sends indirect RAM
MOV @Ri,#data 76~77 data direct byte to indirect RAM
MOV @Ri,#data 76~77 data immediately sends data to indirect RAM
MOV DPTR,#data16 90 data 15~8 16-bit constant to data pointer
data7~0
MOVC A,@A+DPTR 93 Program storage addressed by ((A)+(DPTR))
Device Byte Selection A
MOVC A,@A+PC 83 Send the program memory byte addressed by ((A)+(PC)) to A
MOVX A,@Ri E2~E3 Send external data (8-bit address) to A
MOVX A,@DPTR E0 Send external data (16-bit address) to A
MOVX @Ri,A F2~F3 A sends external data (8-bit address)
MOVX @DPTR,A F0 A sends external data (16-bit address)
PUSH dircet C0 dircet Direct byte is pushed into the stack, SP increases by 1
POP dircet D0 dircet Direct byte popped from stack, SP reduced by 1
XCH A,Rn C8~CF Exchange A and register
XCH A,dircet C5 dircet Exchange A and direct bytes
XCH A,@Ri C6~C7 Exchange A and indirect RAM
XCH A,@Ri D6~D7 Exchange the low bits of A and indirect RAM
SWAP A C4
ADD A,Rn 28~2F register added to A
ADD A,dircet 25 dircet Direct byte added to A
ADD A,@Ri 26~27 Indirect RAM added to A
ADD A,#data 24data Add the immediate value to A
ADD A,Rn 38~3F register and carry bit added to A
ADD A,dircet 35dircet Add direct byte and carry bit to A
ADD A,@Ri 36~37 Indirect byte and carry bit added to A
ADD A,data 34 data Add the immediate value and carry bit to A
ADD A,Rn 98~9F A minus register and carry bit
ADD A,dircet 95 dircet A minus the direct byte and carry bit
ADD A,@Ri 36~37 Indirect RAM and carry bit added to A
ADD A,data 34 data Add the immediate value and carry bit to A
SUBB A,Rn 98~9F A minus register and carry bit
SUBB A,dircet 95 Dircet A minus the direct byte and carry bit
SUBB A,@Ri 96~97 A minus indirect RAM and carry bit
SUBB A,#data 94 Subtract the immediate value and carry bit from data A
INC A 04 A plus 1
INC Rn 08~0F Register plus 1
INC dircet 05 dircet Direct byte plus 1
INC @Ri 06~07 Indirect RAM plus 1
DEC A 14 A minus 1
DEC Rn 18~1F Register decrement 1
DEC dircet 15 dircet direct byte minus 1
DEC @Ri 16~17 Indirect RAM minus 1
INC DPTR A3 Data pointer plus 1
MUL AB A4 multiply A by B
DIV AB 84 A divided by B
DA A D4 A decimal addition adjustment
ANL A,dircet 55 dircet Direct byte AND to A
ANL A,@Ri 56~57 Indirect RAm “AND” to A
ANL A,#data 54 data immediate value “AND” to A
ANL dircet A 52 dircet A ANDed to direct byte
ANL dircet,#data 53 dircet data AND immediate data to direct byte
ORL A,Rn 48~4F register "OR" to A
ORL A,dircet 45 dircet Direct byte "OR" to A
ORL A,@Ri 46~47 Indirect RAM “OR” to A
ORL A,#data 44 data immediate value "OR" to A
ORL dircet,A 42 dircet A "OR" to direct byte
ORL dircet,#data 43 dircet data Or immediate data to direct byte
XRL A,Rn 68~6F register "XOR" to A
XRL A,dircet 65 dircet Direct byte "XOR" to A
XRL A,@Ri 66~67 Indirect RAM "XOR" to A
XRL A,#data 64 data immediate value "XOR" to A
XRL dircet A 62 dircet A "XOR" to direct byte
XRL dircet,#data 63 dircet data XOR immediate data to direct byte
CLR A E4 Clear
CPL A F4 A invert
RL A 23 A Left ring shift
RLC A 33 A Shift left by carrying
RR A 03 A right ring shift
RRC A 13 A Shift right by carry
LCALL addr 16 12 addr(15~8) long subroutine call
addr(7~0)
RET 22 Subroutine call return
RETI addr 11 32 Interrupt call return
AJMP addr 11 △1 addr (a7~a6) absolute jump
LJMP addr 16 02addr(15~8) long transfer
addr(7~0)
SJMP rel 80 rel short jump, relative jump
JMP @A+DPTR 73 Indirect transfer relative to DPTR
JZ rel 60 rel A is zero transfer
JNZ rel 70 rel A is zero transfer
CJNE A,dircet,rel B5 dircet rel Direct byte comparison with A, jump if not equal
CJNE A,#data,rel B4 data rel Compare the immediate value with A, if not equal, jump
CJNE A,Rn,#data,rel B8~BF data rel Compare the immediate value with the register, if they are not equal, jump
CJNE @Ri,#data,rel B6~B7 data rel Compare immediate data with indirect RAM, jump if not equal
DJNZ Rn,rel D8~DF rel Register decrement 1, transfer if not zero
DJNZ dircet,rel B5 dircet rel Direct byte minus 1, jump if not zero
NOP 00 No operation
*=a10a9a8l
△=a10a9a80
CLR bit C2 Clear direct bit
SETB C D3 Set Carry
SETB bit D2 Set direct bit
CPL C B3 Carry negation
CPL bit B2 Direct bit inversion
ANL C, bit 82 dit Direct number “and” to carry
ANL C,/bit B0 Direct bit inverse “AND” to carry
ORL C,bit 72 bit Direct bit “OR” to carry
ORL C,/bit A0 bit Direct bit negative “OR” to carry
MOV C,bit A2 bit Directly transfer the carry
MOV bit,C 92 bit Carry to direct bit
JC rel 40 rel Jump if the carry bit is 1
JNC rel 50 rel Jump if the carry bit is 0
JB bit,rel 20 bit rel Direct bit is 1 relative transfer
JNB bit,rel 30 bit rel Direct bit is 0 relative transfer
JBC bit,rel 10 bit rel Directly transfer relative bit to 1, then clear the bit
Keywords:MCU
Reference address:MCU instruction function
1. Transmission Operation
Mnemonic code description2. Arithmetic Operations
(The two nibbles of A are swapped)3. Logical Operations
ANL A,Rn 58~5F register "AND" to A4. Control Program Transfer
ACALL addr 11 *1 addr(a7~a0) absolute subroutine call5. Boolean variable operations
CLR C C3 Clear Carry
Previous article:Single chip intelligent instrument
Next article:MCU Base Conversion
Recommended ReadingLatest update time:2024-11-16 19:48
Design and application of 32-bit microcontroller MPC555 in automotive electronics
With the rapid development of the automobile industry, the requirements of automobiles in terms of control, communication and network are becoming more and more complex. The new generation of electronic control units (ECUs) with 32-bit microcontrollers and embedded real-time operating systems as basic technical feature
[Microcontroller]
STM8 MCU + EV1527 wireless 315 & 433 universal remote control decoding program
The microcontroller source program is as follows: /* ********************************************************************************************************* * * Module name: EV1527 remote control decoding * After the rising edge triggers the interrupt, the pin level is detected after a
[Microcontroller]
Five important steps to improve MCU technology
Step 1: Read the MCS-51 tutorial to understand the internal structure, instructions, bus, etc. of the microcontroller;
Step 2: Design one yourself by referring to some schematic diagrams in the book, for example: minimum system, etc.;
Step 1: Buy a universal test board and related components in the electronics market
[Microcontroller]
PIC microcontroller interrupt program example
PIC microcontroller interrupt program example What is an interrupt routine? A vivid metaphor is like you are reading my article now, and suddenly your friend asks you to go roast sweet potatoes together. At this time, you interrupt reading the article and roast sweet potatoes with your friend. After roasting sweet p
[Microcontroller]
Design of seismic survey sensor network based on C8051f020 microcontroller and UDP/IP protocol
As seismic survey technology develops toward precision measurement, it is necessary to conduct in-depth research on seismic detection technology with wide frequency band, high sensitivity, and small distortion. At the same time, a set of geophones should be placed in a certain manner at the survey site, and the data f
[Microcontroller]
51 MCU driving relay can use several chips like this
A relay is an electronic control device that has a control system (also known as an input circuit) and a controlled system (also known as an output circuit). It is usually used in automatic control circuits. It is actually an "automatic switch" that uses a smaller current to control a larger current. Therefore, it p
[Microcontroller]
Difference, implementation and optimization of RC5 and RC6 algorithms of AVR microcontroller
introduction
In a wireless LAN, the transmission medium is mainly radio waves and infrared rays. Any eavesdropper with receiving ability may intercept the data in the wireless channel, grasp the content of the transmission, and cause data leakage. Therefore, for wireless LAN, data encryption is one of the key tech
[Microcontroller]
Microcontroller literacy: the relationship between MCS51 and 8051/8031, etc.
We always talk about 8051, 8031, and now there is 89C51 and 89s51. What is the relationship between them? MCS51 refers to the general name of a series of single- chip microcomputers produced by the American INTEL company (yes, the famous INTEL) . This series of single-chip microcomputers includes many varieties, su
[Power Management]
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
Recommended Content
Latest Microcontroller Articles
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
MoreDaily News
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
Guess you like
- How to send two-way PWM with dead zone complementation in micropython
- TMS320F28335 Serial Port SCI
- Multi-channel current detection
- 【Topmicro Intelligent Display Module】Part 4: Comprehensive evaluation of text scrolling, RTC, etc.
- Display QR code-Intelligent TFT module
- EEWORLD University ---- Open Source PWM Robotic Arm (STM32 Version) Video Tutorial
- [RVB2601 Creative Application Development] Part 4 Sound Histogram
- Waveform changes of different ANT frequencies
- Regulator tube usage help
- [GD32L233C-START Review] IV. USART