Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Тексты(все).docx
Скачиваний:
4
Добавлен:
01.07.2025
Размер:
1 Мб
Скачать
☆

Basic Programming Model register operands

Operands may be located in one of the 32-bit general registers (EAX, EBX, ECX, EDX, ESI, EDI, ESP, or EBP), in one of the 16-bit general registers(AX, BX, CX, DX, SI,

Di, sp, or bp), or in one of the 8-bit general registers (ah,

BH, CH, DH, AL, BL, CL, or DL) . An instruction which uses 16-bit register operands must use the 16-bit operand size prefix(a byte with the value 67H before the remain­der of the instruction).

The microprocessor has instructions for referencing the segment registers (CS, DS, ES, SS, FS, AND GS) . These instructions are used by application programs only if segmentation is being used.

The microprocessor also has instructions for changing the state of individual flags in the EFLAGS register. Instructions have been provided for setting and clearing flags which often need to be accessed. The other flags, which are not accessed so often, can be changed by pushing the contents of the EFLAGS register on the stack, making changes to it while it's on the stack, and pop­ping it back into the register.

Упражнение 7. Найдите в Тексте II “Memory Operands” эквиваленты следующих выражений:

  1. явное задание адреса операндов;

  2. содержащий операнд;

  3. используя префикс переопределения сегментного регистра;

  4. помещенный в начало;

  5. называемый mod R/M;

  6. базовый регистр, индексный регистр, масштабирующий множитель и смещение;

  7. за которым следует другой байт;

  8. задан непосредственно в коде команды;

  9. используя регистр ESI.

Упражнение 8. Найдите в Тексте II “Memory Operands” случаи употребления прилагатель­ных в степенях сравнения. Внимательно переведите эти предложения и напишите противо­положные им по значению.

В русском и английском языке употребление союза whether — ли очень отличается.

У пражнение 9. Сравните английскую и русскую фразы. Определите место whether в английском предложении:

The byte ... comes after the opcode and specifies whether the operand is in a register or in memory.

Байт ... следует за кодом операции и определяет, находится ли операнд в регистре или в памяти.

Переведите, используя Текст (правильно определите место союза):

Я сомневаюсь, является ли эта форма адресации самой гибкой.

Я не знаю, может ли команда пересылки адресовать ячейку памяти двойным словом.

Я хочу знать, определяется ли смещение одним из следующих способов.

Р азвлечения ради переведите скороговорку:

I wonder whether the weather will weather the weather or whether the weather the weather will kill.

Упражнение 10. Now read the text carefully:

Text II

Memory operands

Instructions with explicit operands in memory must reference the segment containing the operand and the offset from the beginning of the segment to the operand. Segments are specified using a segment-override prefix, which is a byte placed at the beginning of an instruc­tion. If no segment is specified, simple rules assign the segment by default. The offset is specified in one of the following ways:

  1. Most instructions which access memory contain a

byte for specifying the addressing method of the oper­and. The byte, called the mod R/M byte, comes after the opcode and specifies whether the operand is in a regis­ter or in memory. If the operand is in memory, the address is calculated from a segment register and any of the following values: a base register, an index

register, a scaling factor, and a displacement. When an index register is used, the modR/M byte also is fol­lowed by another byte to specify the index register and scaling factor. This form of addressing is the most flexible.