The function of this instruction is to divide the 8-bit unsigned integer in accumulator A by the 8-bit unsigned integer in register B. The quotient is stored in accumulator A, and the remainder is stored in register B. The division operation always makes OV and the carry flag CY equal to 0. If OV=1, indicating that the content in register B is 00H, then the execution result is an indeterminate value, indicating that the division has overflowed.
DIV AB; (A) ÷ (B) → (A) and (B) The content in accumulator A is divided by the content in register B. The quotient is stored in accumulator A, and the remainder is stored in register B.
For example: 13/5, the quotient is 2 and the remainder is 3. After the division, the quotient is placed in A and the remainder is placed in B, and CU and OV are both 0. If the value in B is 00H before the division, that is, the divisor is 0, then OV=1.
Previous article:51 MCU plus 1 instruction (5 instructions) Example
Next article:51 MCU multiplication instruction (1)
- 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
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- Disassembly of an eight-year-old laptop battery!
- Sound pressure, sound intensity and sound power
- Proteus MSP430 MCU simulation example 8-2-bit digital tube countdown
- The TouchGFX Designer is a real pain
- How to implement analog serial communication with TI MSP430
- ffmpeg port on at91sam9261ek
- How to understand the automatic reload function of the timer
- Things to note when using peelable adhesive
- Last day! TI Live Broadcast with Prizes | Application of Precision ADC in Transmitters
- Renesas CPK-RA6M4 development board evaluation + SHT20 sensor reading data