Presentation is loading. Please wait.

Presentation is loading. Please wait.

Judul Mata Kuliah Judul Pokok Bahasan 1/total Data Movement Instructions.

Similar presentations


Presentation on theme: "Judul Mata Kuliah Judul Pokok Bahasan 1/total Data Movement Instructions."— Presentation transcript:

1 Judul Mata Kuliah Judul Pokok Bahasan 1/total Data Movement Instructions

2 Judul Mata Kuliah Judul Pokok Bahasan 2/total Load-Effective Address There are several LEA instructions in  p –Table 4.9 lists the LEA instructions4.9 LEA –The LEA instruction loads a 16- or 32- bit register with the offset address of the data specified by the operand –E.g., LEA AX,NUMB –Compare: LEA BX,[DI] & MOV BX,[DI] –Understand Example 4.34.3

3 Judul Mata Kuliah Judul Pokok Bahasan 3/total Load-Effective Address (cont’d) LDS, LES, LFS, LGS, LSS –The LDS, LES, LFS, LGS, LSS instructions load any 16- or 32-bit register with an offset address and load the DS, ES, FS, GS, or SS segment register with a segment address –Fig. 4.15 illustrates an example LDS, BX,[DI] instruction4.15 this instruction transfers the 32- bit number, address-ed by DI in the data segment, into the BX and DS registers Study Example 4.44.4

4 Judul Mata Kuliah Judul Pokok Bahasan 4/total String Data Transfers There are 5 string data transfer instructions: LODS, STOS, MOVS, INS, and OUTS The Direction Flag –The direction flag (D) -located in the flag register- selects the auto-increment (D=O) or the auto-decrement (D=1) operation for the DI and SI registers during string operations –The CLD instruction clears the D flag (D=0), and the STD instruction sets it (D=1)

5 Judul Mata Kuliah Judul Pokok Bahasan 5/total String Data Transfers (cont’d) DI and SI –The DI offset address accesses data in the extra segment for all string instructions that use it –The SI offset address accesses data, by default, in the data segment LODS –The LODS instruction loads AL, AX, or EAX with data stored at the data segment offset address indexed by the SI register (Table 4.10) 4.10

6 Judul Mata Kuliah Judul Pokok Bahasan 6/total String Data Transfers (cont’d) –Fig.4.16 shows the effect of executing the LODSW instruction if the D flag=0, SI=1000H, and DS=1000H4.16 STOS –The STOS instruction stores AL, AX, or EAX at the extra segment memory location addressed by the DI register –Table 4.11 lists all forms of STOS instructions4.11 –The STOSB (stores a byte), STOSW (stores a word) and STOSD (stores a doubleword)

7 Judul Mata Kuliah Judul Pokok Bahasan 7/total String Data Transfers (cont’d) –In example 4.5 STOSW instruction is used to clear the video text display4.5 MOVS –MOVS instruction transfers data (either byte, word or doubleword) from one memory loca-tion to another (Table 4.13)4.13 –MOVS transfers data from the data segment location addressed by SI to the extra segment location addressed by DI –Example 4.6 lists a short program that uses MOVS4.6

8 Judul Mata Kuliah Judul Pokok Bahasan 8/total String Data Transfers (cont’d) INS –The INS (input string) instruction transfers data from an I/O device into extra segment memory location addressed by the DI register –The I/O address is contained in the DX register –See Table 4.14 and Study example 4.74.14 4.7 OUTS –The OUTS (output string) transfers data from the data segment location addressed by SI to an I/O device (addressed by DX) -- Table 4.15 & Example 4.84.154.8

9 Judul Mata Kuliah Judul Pokok Bahasan 9/total

10 Judul Mata Kuliah Judul Pokok Bahasan 10/total

11 Judul Mata Kuliah Judul Pokok Bahasan 11/total

12 Judul Mata Kuliah Judul Pokok Bahasan 12/total

13 Judul Mata Kuliah Judul Pokok Bahasan 13/total

14 Judul Mata Kuliah Judul Pokok Bahasan 14/total

15 Judul Mata Kuliah Judul Pokok Bahasan 15/total

16 Judul Mata Kuliah Judul Pokok Bahasan 16/total

17 Judul Mata Kuliah Judul Pokok Bahasan 17/total

18 Judul Mata Kuliah Judul Pokok Bahasan 18/total

19 Judul Mata Kuliah Judul Pokok Bahasan 19/total Referensi Brey, Barry, B., The Intel Microprocessors 8086/8088, 80186/80188, 80286, 80386, 80486, Pentium, and Pentium ProProcessor Architecture, Programming, and Interfacing, Fourth Edition, PHI Inc, USA, 1997. and Five Edition, 2003 Brey, Barry, B., 8086/8088, 80286, 80386, and 80486 Assembly Language, Programming, Macmillan Publising Company, USA, 1994. Leventhal L.A., Introduction to Microprocessor : Software, Hardware, Programming, Phi Inc., 1978. Hall D.V., Microprocessor Interfacing : Programming and Hardware, McGraw-Hill, Singapore, 1986. Ananta, C., William JB., Frank Fox, Design of High- performance microprocessor circuit, IEEE Press, 2001 Douglas V. Hall, Microprocessor and Interfacing: Programming and Hardware, McGraw-Hill, edition 2, 1991 James A., Kenneth CM, Microcomputer Hardware, Software, and Troubleshooting for Engineering and Technology, Prentice Hall, 2000 http://www.intel.com/ http://www.hardwarebible.com/Microprocessors/8086.htm


Download ppt "Judul Mata Kuliah Judul Pokok Bahasan 1/total Data Movement Instructions."

Similar presentations


Ads by Google