MCU instruction function

Publisher:SparklingDreamsLatest update time:2011-09-23 Keywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
MCU instruction function list

1. Transmission Operation

Mnemonic code description
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

2. Arithmetic Operations

(The two nibbles of A are swapped)
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

3. Logical Operations

ANL A,Rn 58~5F register "AND" to A
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

4. Control Program Transfer

ACALL addr 11 *1 addr(a7~a0) absolute subroutine call
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

5. Boolean variable operations

CLR C C3 Clear Carry
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

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]
Design of seismic survey sensor network based on C8051f020 microcontroller and UDP/IP protocol
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]
51 MCU driving relay can use several chips like this
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]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号