The coprocessor contains a total of 68 distinct instructions. When the assembler encounters a coprocessor instruction mnemonic, it translates it into an ESC (Escape) instruction in machine language. This ESC instruction serves as the opcode for the coprocessor, signaling the CPU to execute the corresponding operation.
During the execution of a coprocessor instruction, if memory access is required, the CPU generates the appropriate memory address. The coprocessor communicates with the CPU via the data bus to transfer data. Specifically, the 80287 coprocessor uses I/O addresses from 00FAH to 00FFH for data exchange, while the 80387 and later Pentium series chips use I/O addresses ranging from 800000FAH to 800000FFH for this purpose.
There are three main categories of data transfer instructions in the coprocessor's instruction set: BCD transfer instructions, floating-point transfer instructions, and integer transfer instructions. These instructions facilitate communication between the coprocessor and the CPU, allowing data to be moved between memory and the coprocessor’s internal registers.
**First, BCD Transfer Instructions**
1. **FBLD**
- Instruction format: `FBLD MemBCD`
- Function: Pushes BCD (Binary-Coded Decimal) data from memory onto the coprocessor’s stack.
- Note: `MemBCD` refers to a memory location designated for BCD data. This notation will be used throughout without further explanation.
2. **FBSTP**
- Instruction format: `FBSTP MemBCD`
- Function: Stores the BCD value currently on the top of the coprocessor’s stack into memory and then pops the stack.
For example:
- `FBLD [value]` loads a BCD number from memory into the stack.
- `FBSTP [value]` saves the top of the stack back to memory and removes it from the stack.
**Second, Floating-Point Transfer Instructions**
Floating-point transfer instructions allow the coprocessor to load, store, or exchange values between its internal stack and memory or other registers.
1. **FST**
- Instruction format: `FST MemFloat`
- Function: Copies the value from the top of the stack (ST(0)) to a specified memory location without popping the stack.
2. **FSTP**
- Instruction format: `FSTP MemFloat`
- Function: Copies the value from ST(0) to memory and then pops the stack.
3. **FXCH**
- Instruction format: `FXCH ST(n)`
- Function: Exchanges the contents of the top of the stack (ST(0)) with the nth register in the stack.
Example: `FXCH ST(2)` swaps the top of the stack with the third register.
**Third, Integer Transfer Instructions**
These instructions are used to move integer values between memory and the coprocessor.
1. **FILD**
- Instruction format: `FILD MemInt`
- Function: Loads an integer value from memory into the coprocessor’s stack, converting it to a floating-point number.
2. **FIST / FISTP**
- Instruction format: `FIST MemInt` or `FISTP MemInt`
- Function: Converts the value at the top of the stack (ST(0)) to an integer and stores it in memory.
- Difference: `FIST` does not pop the stack, while `FISTP` does.
These instructions play a crucial role in enabling the coprocessor to handle different data types efficiently, ensuring smooth interaction with the CPU and memory.
A buzzer or beeper is an audio signalling device, which may be mechanical, electromechanical, or piezoelectric (piezo for short). Typical uses of buzzers and beeper include alarm devices, timers, and confirmation of user input such as a mouse click or keystroke.
A buzzer or beeper is an audio signalling device, which may be mechanical, electromechanical, or piezoelectric (piezo for short). Typical uses of buzzers and beeper include alarm devices, timers, and confirmation of user input such as a mouse click or keystroke.
Piezo Buzzer,Dc Electro Magnetic Buzzer,Buzzer Acoustic Components,Piezo Buzzer For Thermometer
Jiangsu Huawha Electronices Co.,Ltd , https://www.hnbuzzer.com