Docsity

x86 Assembly Instructions and Addressing Modes, Slides of Assembly Language Programming

Partial preview of the text

Download x86 Assembly Instructions and Addressing Modes and more Slides Assembly Language Programming in PDF only on Docsity!

Procedures

• PUSHA• POPA• PUSHF• POPF• PUSHAD• POPAD\• .286? .386?

NEAR CALL

  • Same code segment• Only IP is pushed

Addressing Modes

: Base Plus Index Addressing

  • Base holds the address of the base of the

array

  • Index holds the element position• In book , page 111 with name Base-Index

operands

  • Two dimensional array

Base Plus index addressing

formats

• MOV CX , [BX+DI]• MOV CH, [BP+SI]• MOV [BX+SI],SP• MOV [BP+DI], AH• MOV CL, [EDX+EDI]• MOV [EAX+EBX], ECX

BASED-Indexed formats

  • MOV AX, [DI+100H]• MOV array[SI], BL• MOV LIST[SI+2],CL• MOV DI, SET_IT[BX]• MOV DI, [EAX+10H]• MOV ARRAY[EBX], EAX

Base Index plus displacement

Addressing

  • Combine base, index and displacement• MOV DH, [BX+DI+20H]• MOV AX, FILE[BX+DI]• MOV LIST[BP+DI], CL