Podcast
Questions and Answers
Which register is used to store the base address of the stack segment?
Which register is used to store the base address of the stack segment?
What is the maximum number of descriptors that can be addressed by the segment register in protected mode?
What is the maximum number of descriptors that can be addressed by the segment register in protected mode?
Which register is used to store the base address of the data segment?
Which register is used to store the base address of the data segment?
Which register is used to store the base address of the code segment?
Which register is used to store the base address of the code segment?
Signup and view all the answers
Which instruction is used to transfer data between a segment register and a 16-bit register or memory location?
Which instruction is used to transfer data between a segment register and a 16-bit register or memory location?
Signup and view all the answers
Which addressing mode is used to specify any 8-bit or 16-bit register?
Which addressing mode is used to specify any 8-bit or 16-bit register?
Signup and view all the answers
Which instruction is used to transfer data between a register or memory location and the stack?
Which instruction is used to transfer data between a register or memory location and the stack?
Signup and view all the answers
What type of registers are AH, AL, BH, and BL?
What type of registers are AH, AL, BH, and BL?
Signup and view all the answers
Which opcode is used to transfer all the 16-bit registers between the stack and the registers?
Which opcode is used to transfer all the 16-bit registers between the stack and the registers?
Signup and view all the answers
Which addressing mode is used when the MOD field is set to 11?
Which addressing mode is used when the MOD field is set to 11?
Signup and view all the answers
Which instruction transfers the contents of the EFLAGS between the microprocessor and the stack in 80386 and above?
Which instruction transfers the contents of the EFLAGS between the microprocessor and the stack in 80386 and above?
Signup and view all the answers
To access 64-bit registers, what prefix is added that contains a fourth bit?
To access 64-bit registers, what prefix is added that contains a fourth bit?
Signup and view all the answers
Which addressing mode in the 80386 and above uses a base or index register, plus a displacement to access memory data?
Which addressing mode in the 80386 and above uses a base or index register, plus a displacement to access memory data?
Signup and view all the answers
In the instruction 'MOV AX, [EBX + 2*ECX]', what type of addressing mode is being used?
In the instruction 'MOV AX, [EBX + 2*ECX]', what type of addressing mode is being used?
Signup and view all the answers
What is the unique feature of scaled-index addressing in the 80386 through Core2 architecture?
What is the unique feature of scaled-index addressing in the 80386 through Core2 architecture?
Signup and view all the answers
Which of the following instructions is an example of scaled-index addressing?
Which of the following instructions is an example of scaled-index addressing?
Signup and view all the answers
What does indirect program addressing allow the JMP or CALL instructions to do?
What does indirect program addressing allow the JMP or CALL instructions to do?
Signup and view all the answers
Which type of memory array addressing is useful for accessing a two-dimensional array?
Which type of memory array addressing is useful for accessing a two-dimensional array?
Signup and view all the answers
Study Notes
Register Addressing
- Any 8-bit register (AH, AL, BH, BL, CH, CL, DH, or DL) or any 16-bit register (AX, BX, CX, DX, SP, BP, SI, or DI) can be addressed.
- The segment registers (CS, DS, ES, or SS) are also addressable for moving data between a segment register and a 16-bit register/memory location or for PUSH and POP.
Segment Registers
- In protected mode, the segment register contains three fields of information.
- The leftmost 13 bits of the segment register address one of 8192 descriptors from a descriptor table.
- The segment register contains a cache portion that is used in protected mode to hold the base address, limit, and access rights acquired from a descriptor.
.MODEL Statement
- The .MODEL statement is used with assembly language to identify the start of a file and the type of memory model used with the file.
Extended Registers
- In the 80386 through the Core2 microprocessors, the extended registers (EAX, EBX, ECX, EDX, ESP, EBP, EDI, and ESI) are also used for register addressing.
- In the 64-bit mode, the registers are RAX, RBX, RCX, RDX, RSP, RBP, RDI, RSI, and R8 through R15.
PUSH and POP Instructions
- Data are transferred between a register or a memory location and the stack by the PUSH and POP instructions.
- Variations of these instructions allow immediate data to be pushed onto the stack, the flags to be transferred between the stack, and all 16-bit registers can transfer between the stack and registers.
Register Sizes
- The 8-bit registers are AH, AL, BH, BL, CH, CL, DH, and DL.
- The 16-bit registers are AX, BX, CX, DX, SP, BP, DI, and SI.
- The 32-bit registers are EAX, EBX, ECX, EDX, ESP, EBP, EDI, and ESI.
Memory Addressing
- By default, all memory-addressing modes address data in the data segment unless BP or EBP addresses memory.
- The BP or EBP register addresses data in the stack segment.
- Direct program memory addressing is allowed with the JMP and CALL instructions to any location in the memory system.
Addressing Modes
- Base relative addressing uses a base register, plus a displacement to access memory data.
- Base relative-plus-index addressing is useful for addressing a two-dimensional memory array.
- Scaled-index addressing is unique to the 80386 through the Core2 and allows accessing words, doublewords, or quadwords in memory arrays.
- Relative program addressing allows a JMP or CALL instruction to branch forward or backward in the current code segment by bytes.
- Indirect program addressing allows the JMP or CALL instructions to address another portion of the program or subroutine indirectly through a register or memory location.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Test your knowledge on machine language instructions, addressing modes, data transfer operations between registers and memory, and the usage of PUSH and POP instructions. A focus on the MOD field, register codes, and variations of instructions is included in this quiz.