The function of this group of instructions is to subtract 1 from the content of the register pointed to, and send the result back to the original register. If the content of the original register is 00H, it will be FFH after subtracting 1. The operation result does not affect any flag bit. This group of instructions has direct, register, and inter-register addressing modes. When the direct address is an I/O port latch, the "read-modify-write" operation is similar to the add 1 instruction.
DEC A; (A) -1 → (A) The content in accumulator A is subtracted by 1, and the result is sent back to accumulator A.
DEC data; (data) -1 → (data) The content in the direct address unit is reduced by 1, and the result is sent back to the direct address unit
DEC @Ri; ((Ri)) -1 → ((Ri)) The content in the address unit pointed to by register Ri is reduced by 1, and the result is sent back to the original address unit
DEC Rn; (Rn) -1 → (Rn) The content in register Rn is reduced by 1, and the result is sent back to register Rn
Previous article:mcs51 instruction classification statistics list
Next article:51 MCU plus 1 instruction (5 instructions) Example
- Popular Resources
- Popular amplifiers
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
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Wio Terminal
- 【MYS-8MMX】- 2: SD card boot
- Play with Node MCU ESP8266 LUA to output weather information via serial port
- DIY handheld game console based on ESP32 (the original post cannot be updated)
- DSP C6000 addressing mode
- Detailed explanation of third-order intermodulation distortion and testing
- [Mill Edge AI Computing Box FZ5 Review] First experience with "object detection"
- Raspberry Pi Pico Documentation
- 【Beetle ESP32-C3】Hardware Analysis
- Design Method of AC/DC PWM Flyback Converter