chapter4.5 6-mikroprocessor
TRANSCRIPT
![Page 1: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/1.jpg)
Data Movement Instructions
A Course in Microprocessor
Electrical Engineering Department
University of Indonesia
![Page 2: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/2.jpg)
MISCELLANEOUS DATA TRANSFER INSTRUCTION
XCHG– The XCHG (exchange) instruction exchanges the
contents of a register to any other register or memory location
– Table 4.16 list the forms of the XCHG instructions
LAHF and SAHF– These instructions allowed 8085 software to be
translated into 8086 software by a translation program; They are seldom used
![Page 3: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/3.jpg)
MISCELLANEOUS DATA TRANSFER INSTRUCTION (cont’d)
XLAT– The XLAT (translate) instruction converts the
contents of the AL register into a number stored in a memory table
– This instruction performs the direct table look-up technique
– Study Example 4.9 and Fig.4.17
IN and OUT
![Page 4: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/4.jpg)
MISCELLANEOUS DATA TRANSFER INSTRUCTION (cont’d)
– Table 4.17 lists the forms of IN and OUT instructions, which perform I/O operations
– Two forms of I/O device (port) addressing exist for IN and OUT: fixed-port (i.e., port number follows the instruction’s op-code) and variable port (i.e., it has permanent port number, stored in a ROM)
– The port address appears on the address bus during an I/O instruction
– Study Fig.4.18 and Example 4.10
![Page 5: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/5.jpg)
MISCELLANEOUS DATA TRANSFER INSTRUCTION (cont’d)
MOVSX and MOVZX– The MOVSX (move and sign-extend) and
MOVZX (move and zero-extend) move data and at the same time either sign-extend (i.e., its sign-bit is copied into the most significant part) or zero-extend (i.e., the most significant part fills with zero) it. See Table 4.18
BSWAP– The BSWAP (byte swap) instruction takes the
contents of any 32-bit register and swaps the 1st byte with the 4th, and the 2nd with the 3th
![Page 6: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/6.jpg)
MISCELLANEOUS DATA TRANSFER INSTRUCTION (cont’d)
CMOV– The CMOV (conditional move) only move the
data if the condition is true– See Table 4.19 and example 4.11
![Page 7: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/7.jpg)
SEGMENT OVERRIDE PREFIX
The segment override prefix allows the programmer to deviate from the default segment– e.g., the MOV AX,[DI] --> MOV AX,ES:[DI]
See Table 4.20
![Page 8: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/8.jpg)
![Page 9: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/9.jpg)
![Page 10: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/10.jpg)
![Page 11: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/11.jpg)
![Page 12: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/12.jpg)
![Page 13: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/13.jpg)
![Page 14: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/14.jpg)
![Page 15: Chapter4.5 6-mikroprocessor](https://reader036.vdocuments.net/reader036/viewer/2022070319/55848c44d8b42a9f028b5285/html5/thumbnails/15.jpg)