Presentation is loading. Please wait.

Presentation is loading. Please wait.

KMUTT: S. Srakaew Instructions Can Be Divided into 3 Classes Data movement instructions  Move data from a memory location or register to another memory.

Similar presentations


Presentation on theme: "KMUTT: S. Srakaew Instructions Can Be Divided into 3 Classes Data movement instructions  Move data from a memory location or register to another memory."— Presentation transcript:

1 KMUTT: S. Srakaew Instructions Can Be Divided into 3 Classes Data movement instructions  Move data from a memory location or register to another memory location or register without changing its form  Load—source is memory and destination is register  Store—source is register and destination is memory Arithmetic and logic (ALU) instructions  Change the form of one or more operands to produce a result stored in another location  Add, Sub, And Shift, etc. Branch instructions (control flow instructions)  Alter the normal flow of control from executing the next instruction in sequence  Jmp Loc, Jz Loc2,—unconditional or conditional branches

2 KMUTT: S. Srakaew Examples of Data Movement Instructions InstructionMeaning MOV AX,BX Move 16 bits from register BX to register AX MOV AL,[1234H] Load register AL with the byte content of the data segment memory address 1234H MOV BL,48 Copy 48 decimal(8-bit) (30H) into BL MOV EAX, 100Y Copy a 100 binary (32-bit) into EAX MOV AH, ‘A’Copy an ASCII ‘A’ (8-bit) into AH MOV AX, ‘AB’Copy an ASCII ‘BA’(16-bit) into AX

3 KMUTT: S. Srakaew Examples of ALU Instructions InstructionMeaning ADD AL, BLAL = AL + BL ADD BX, 2345HBX = BX + 2345H SUB DH, 2FHDH = DH - 2FH SUB ECX, data1Subtract the doubleword contents of the data segment memory location addressed by data1 from ECX MUL ECXEAX is multiplied by ECX; the unsigned product is in EDX-EAX

4 KMUTT: S. Srakaew Examples of Branch Instructions InstructionMeaning JMP Addr Jump to address Addr. JCXZ AddrJump to Addr if contents of register CX  0.

5 KMUTT: S. Srakaew Programming The 80x86 Addressing Modes

6 KMUTT: S. Srakaew Programming The 80x86 Register Addressing

7 KMUTT: S. Srakaew Programming The 80x86 Register Addressing: Example

8 KMUTT: S. Srakaew Programming The 80x86 Immediate Addressing

9 KMUTT: S. Srakaew Programming The 80x86 Direct Addressing

10 KMUTT: S. Srakaew Programming The 80x86 Direct Addressing

11 KMUTT: S. Srakaew Programming The 80x86 Direct Data Addressing

12 KMUTT: S. Srakaew Programming The 80x86 Direct Data Addressing: Example

13 KMUTT: S. Srakaew Programming The 80x86 Register Indirect Addressing

14 KMUTT: S. Srakaew Programming The 80x86 Register Indirect Addressing

15 KMUTT: S. Srakaew Programming The 80x86 Register Indirect Addressing: Example

16 KMUTT: S. Srakaew Programming The 80x86 Register Indirect Addressing

17 KMUTT: S. Srakaew Programming The 80x86 Base-Plus-Index Addressing

18 KMUTT: S. Srakaew Programming The 80x86 Base-Plus-Index Addressing

19 KMUTT: S. Srakaew Programming The 80x86 Base-Plus-Index Addressing: Array Structure

20 KMUTT: S. Srakaew Programming The 80x86 Base-Plus-Index Addressing: Array Structure

21 KMUTT: S. Srakaew Programming The 80x86 Register Relative Addressing

22 KMUTT: S. Srakaew Programming The 80x86 Register Relative Addressing

23 KMUTT: S. Srakaew Programming The 80x86 Array Structure Using Register Relative

24 KMUTT: S. Srakaew Programming The 80x86 Array Structure Using Register Relative

25 KMUTT: S. Srakaew Programming The 80x86 Base Relative-Plus-Index Addressing

26 KMUTT: S. Srakaew Programming The 80x86 Base Relative-Plus-Index Addressing

27 KMUTT: S. Srakaew Programming The 80x86 Base Relative-Plus-Index Addressing

28 KMUTT: S. Srakaew Programming The 80x86 Base Relative-Plus-Index Addressing

29 KMUTT: S. Srakaew Programming The 80x86 Scaled-Index Addressing

30 KMUTT: S. Srakaew Programming The 80x86 Scaled-Index Addressing

31 KMUTT: S. Srakaew Programming The 80x86 Direct Program Memory Addressing

32 KMUTT: S. Srakaew Programming The 80x86 Stack Memory Addressing: PUSH

33 KMUTT: S. Srakaew Programming The 80x86 Stack Memory Addressing: POP

34 KMUTT: S. Srakaew Programming The 80x86


Download ppt "KMUTT: S. Srakaew Instructions Can Be Divided into 3 Classes Data movement instructions  Move data from a memory location or register to another memory."

Similar presentations


Ads by Google