Entry condition: The absolute value of the two-byte fixed-point number is in [R0], the sign is in bit 1FH, and the number of digits in the integer part is in A.
Exit information: Converted into a formatted floating-point number in [R0] (three bytes).
Affected resources: PSW, A, R2, R3, R4, bit 1FH Stack requirement: 6 bytes
DTOF: MOV R2,A; Initialize the exponent according to the number of digits in the integer
MOV A,@R0; Use the fixed-point number as the mantissa
MOV R3,A
INC R0
MOV A,@R0
MOV R4,A
DEC R0
LCALL RLN; Normalize
LJMP MOV0; Transfer the result to [R0]
Previous article:Format floating point number into double-byte fixed point number
Next article:Base 2 floating point exponential function
- 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
- 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
- Sandia Labs develops battery failure early warning technology to detect battery failures faster
- The output data of the ADC chip is incorrect no matter how I process it. Please help.
- Some knowledge about optical splitters
- [NXP Rapid IoT Review] Unboxing Test
- Practical Tips | Four Myths About Ultra-Wideband (UWB) Technology
- 3 days left: Free application, Allwinner quad-core A40i low power and high performance evaluation board
- "Playing with the board" + Zhou Hangci's book Chapter 11, Example 1
- Pads color setting problem
- Introduction to the working principle of HAL248
- Download: Distributed Wi-Fi for Smart Homes
- 【ST NUCLEO-H743ZI Review】+ Unboxing and lighting