Chapter 4 Flashcards
Data movement instructions
MOV, MOVSX, MOVZX, PUSH, POP, BSWAP, XCHG, XLAT, IN, OUT, LEA, LDS LES, LFS, LGS, LSS, LAHF, SAHF
String Instructions
MOVS, LODS, STOS, INS, OUTS
CMOV
Condition Move Instruction
Are presented first because they are more commonly used in programs and are easy to understand
Data Movement Instructions
Latest data transfer instruction implemented on the Pentium Pro and above
CMOV
Native binary code that the microprocessor understand and uses as its instructions to control its operation.
Machine Language
Is introduced because it may occasionally be necessary to interpret machine language programs generated by an assembler or inline assembler of Visual C++
Machine Code
Machine language instructions for the 8086 through Core 2 vary in length from
1 to as many as 13 bytes
66H
Register-size prefix
67H
Address size-prefix
Appended to the front of the instructions
Register-size prefix
Is used in a similar fashion
Address size-prefix (67H)
Should be selected to function with the current application
Mode of Operation (16 or 32 bit)
Selects the operation that is performed by the microprocessor
Opcode
Is either 1 or 2 bytes long for most machine language instructions
Opcode
The first 6 bits of the first byte are the
Binary opcode
The two remaining bits in the first 6 bits of the first byte is called
Direction (D)
D =1
To the register (REG) field from the R/M field
D=0
To the R/M field from REG field
Specifies the addressing mode for the selected instruction
MOD Field
Are important instructions that store and retrieve data from LIFO stack memory
PUSH and POP
Six forms of the PUSH and POP instructions
Register, memory, immediate, segment register, flags and all registers
Allows the contents of any 16-bit register to be transferred to or from the stack
Register addressing
Allows immediate data to be pushed onto the stack, but not popped off the stack.
Immediate Addressing
Allows the contents of any segment register to be pushed onto the stack ot removed from the stack
Segment register addressing
Always transfer 2 bytes of data to the stack; the 80386 and ab9ve transfer 2 or 4 bytes, depending on the register or size of the memory location
PUSH instruction
Copies the contents of the internal register set, except the segment register, to the stack
PUSHA
PUSHA instruction copies the registers to the stack in following order:
AX, CX, DX, BX, SP, BP, SI and DI
Copies the contents of the flag register to the stack
PUSHF
Push and pop the contents of the 32-bit register set found in the 80386 through Pentium 4.
PUSHAD and POPAD
Performs the inverse operation of a PUSH instructions
POP instruction
Removes data from the stackcand places it into the target 16-register, segment register or a 16-bit memory location
POP instruction
POPA instruction removrs 16 bytes of data from the stack a d places them into the following register
DI, SI, BP, SP, BX DX, CX, and AX
Removes 16-bit number from the stack and places it into the flag register
POPF
Removes a 32-bit number from the stack and places it into the extended flag register
POPFD
Reloads the 32-bit register from the stack
POPAD