Data Movement Instructions A Course in Microprocessor Electrical Engineering Department University of Indonesia
MISCELLANEOUS DATA TRANSFER INSTRUCTION <ul><li>XCHG </li></ul><ul><ul><li>The XCHG (exchange) instruction exchanges the c...
MISCELLANEOUS DATA TRANSFER INSTRUCTION  (cont’d) <ul><li>XLAT </li></ul><ul><ul><li>The XLAT (translate) instruction conv...
MISCELLANEOUS DATA TRANSFER INSTRUCTION  (cont’d) <ul><ul><li>Table  4.17  lists the forms of IN and OUT instructions, whi...
MISCELLANEOUS DATA TRANSFER INSTRUCTION  (cont’d) <ul><li>MOVSX and MOVZX </li></ul><ul><ul><li>The MOVSX (move and sign-e...
MISCELLANEOUS DATA TRANSFER INSTRUCTION  (cont’d) <ul><li>CMOV </li></ul><ul><ul><li>The CMOV (conditional move) only move...
SEGMENT OVERRIDE PREFIX <ul><li>The segment override prefix allows the programmer to deviate from the default segment </li...
 
 
 
 
 
 
 
 
Upcoming SlideShare
Loading in …5
×

Chapter4.5 6-mikroprocessor

443 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
443
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Chapter4.5 6-mikroprocessor

  1. 1. Data Movement Instructions A Course in Microprocessor Electrical Engineering Department University of Indonesia
  2. 2. MISCELLANEOUS DATA TRANSFER INSTRUCTION <ul><li>XCHG </li></ul><ul><ul><li>The XCHG (exchange) instruction exchanges the contents of a register to any other register or memory location </li></ul></ul><ul><ul><li>Table 4.16 list the forms of the XCHG instructions </li></ul></ul><ul><li>LAHF and SAHF </li></ul><ul><ul><li>These instructions allowed 8085 software to be translated into 8086 software by a translation program; They are seldom used </li></ul></ul>
  3. 3. MISCELLANEOUS DATA TRANSFER INSTRUCTION (cont’d) <ul><li>XLAT </li></ul><ul><ul><li>The XLAT (translate) instruction converts the contents of the AL register into a number stored in a memory table </li></ul></ul><ul><ul><li>This instruction performs the direct table look-up technique </li></ul></ul><ul><ul><li>Study Example 4.9 and Fig. 4.17 </li></ul></ul><ul><li>IN and OUT </li></ul>
  4. 4. MISCELLANEOUS DATA TRANSFER INSTRUCTION (cont’d) <ul><ul><li>Table 4.17 lists the forms of IN and OUT instructions, which perform I/O operations </li></ul></ul><ul><ul><li>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) </li></ul></ul><ul><ul><li>The port address appears on the address bus during an I/O instruction </li></ul></ul><ul><ul><li>Study Fig. 4.18 and Example 4.10 </li></ul></ul>
  5. 5. MISCELLANEOUS DATA TRANSFER INSTRUCTION (cont’d) <ul><li>MOVSX and MOVZX </li></ul><ul><ul><li>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 </li></ul></ul><ul><li>BSWAP </li></ul><ul><ul><li>The BSWAP (byte swap) instruction takes the contents of any 32-bit register and swaps the 1 st byte with the 4 th , and the 2 nd with the 3 th </li></ul></ul>
  6. 6. MISCELLANEOUS DATA TRANSFER INSTRUCTION (cont’d) <ul><li>CMOV </li></ul><ul><ul><li>The CMOV (conditional move) only move the data if the condition is true </li></ul></ul><ul><ul><li>See Table 4.19 and example 4.11 </li></ul></ul>
  7. 7. SEGMENT OVERRIDE PREFIX <ul><li>The segment override prefix allows the programmer to deviate from the default segment </li></ul><ul><ul><li>e.g., the MOV AX,[DI] --> MOV AX,ES:[DI] </li></ul></ul><ul><li>See Table 4.20 </li></ul>

×