Научная литература
booksshare.net -> Добавить материал -> Лингвистика -> Гольцова Е.В. -> "Английский язык для пользователей ПК и программистов" -> 45

Английский язык для пользователей ПК и программистов - Гольцова Е.В.

Гольцова Е.В. Английский язык для пользователей ПК и программистов — Спб.: Учитель и ученик, 2002. — 480 c.
ISBN 5-7931-0086-5
Скачать (прямая ссылка): englishdlyapolzpk2002.djvu
Предыдущая << 1 .. 39 40 41 42 43 44 < 45 > 46 47 48 49 50 51 .. 165 >> Следующая


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

weather the weather will kill.

MEMORY OPERANDS

138 /

_Урок ІЗ

1. Most instructions which access memory contain a byte for specifying the addressing method of the operand. The byte, called the mod R/M byte, comes after the opcode and specifies whether the operand is in a register 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 followed by another byte to specify the index register and scaling factor. This form of addressing is the most flexible.

2. A few instructions select segments by default:

A MOV instruction with the AL or EAX register as either source or destination can address memory with a double-word encoded in the instruction. This special form of the MOV instruction allows no base register, index register, or scaling factor to be used. This form is one byte shorter than the general-purpose form.

String operations address memory in the DS segment using the ESI register, (the MOVS, CMPS, OUTS, LODS, and SCAS instructions) or using the ES segment and EDI, register(the MOVS, CMPS, INS, and STOS instructions).

Stack operations address memory in the SS segment using the ESP register(the PUSH, POP, PUSHA, PUSHAD, POPA, POPAD, PUSHF, PUSHFD, POPF, POPFD. CALL. RET, IRET, and IRETD instructions, exceptions, and interrupts) .

Упражнение 11. Ask somebody to explain, putting indirect questions. Begin with "Will you explain (tell)...".

НаучимСя задавать косвенные вопросы, тем более что они легче прямых вопросов. Обязательная схема вопроса уже содержится в первой его части, которую легко запомнить, а потом мы присоединяем то, что нас интересует в виде обычного предложения. Первый раз лучше выполнить это упражнение письменно.

Model: What are memory operands?

Will you explain what memory operands are?

Will you tell me what memory operands are?

1) What is a segment-override prefix?_

2) What are two ways to specify the offset?_

3) What does the modR/M specify?_

4) What instructions select segments by default?__

139 Английский для пользователей ПК

Упражнение 12. Read text III carefully and find the equivalents of the following: Прочтите Текст III внимательно и найдите в нем эквиваленты следующих выражений:

1) явное определение;

2) согласно правилам таблицы;

3) правила для выбора сегментов не очевидны (однозначны) для...;

4) различные виды;

5) поэтому, когда любой из регистров используется;

6) на который не воздействует префикс переопределения сегментного регистра.

Text III

SEGMENT SELECTION Explicit specification of a segment is optional. If a segment is not specified using a segment-override prefix, the processor automatically chooses a segment according to the rules of the table. (If a flat model of memory organization is used, the rules for selecting segments are not apparent to application programs).

Type of reference Segment used register used Segment register default selection rule
instructions Code segment CS register automatic with instruction fetch
stack stack segment SS register al 1 stacks pushes and pops any memory reference which uses ESP or EBP as a base register
local data data segment DS register all data references except when relative to stack or string destination
destination strings E-space segment ES register destination of string instructions

Different kinds of memory access have different default segments. Data operands usually use the main data segment (the DS segment). However, the ESP and EBP registers are used for addressing the stack, so when either regist4er is used, the stack segment (the SS segment) is selected.

Segment-override prefixes are used to override the default segment selecton. Segment-override prefixes are

\ Урок 8

provided for each of the segment registers. Only the following special cases have a default segment selection which is not affected by a segment-override prefix:

• Destination strings in string instructions use the ES segment.

• Stack operands use the SS segment.

• Instruction fetches use the CS segment.

Упражнение 13. Переведите таблицу письменно.

Упражнение 14. Прокомментируйте (расскажите) таблицу, используя слова:

рарполагаются в — are located in;

адресуется через — is addressed through;

при этом используется правило ... — there the rule ... is used.

Упражнение 15. Translate into English:

Если перевести предложения вам еще сложно, то переведите подчеркнутые словосочетания и проверьте себя:

Язык низкого уровня — разновидность языка программирования, в котором управление и структуры данных непосредственно отражают архитектуру машины. Язык ассемблера позволяет программисту пользоваться алфавитными мнемоническими кодами операций, по своему усмотрению присваивать символические имена регистрам и памяти, а также задавать удобные для себя схемы адресации, например индексную или косвенную. Кроме того, он позволяет использовать различные системы счисления (например, десятичную или шестнадца-теричную) для представления числовых констант. Он дает возможность пользователю помечать специальными метками (label) строки программ для того, чтобы к ним могли обращаться по символическим именам другие части программы. Например, в случае передачи управления или при переходах. Грамматика
Предыдущая << 1 .. 39 40 41 42 43 44 < 45 > 46 47 48 49 50 51 .. 165 >> Следующая

Реклама

c1c0fc952cf0704ad12d6af2ad3bf47e03017fed

Есть, чем поделиться? Отправьте
материал
нам
Авторские права © 2009 BooksShare.
Все права защищены.
Rambler's Top100

c1c0fc952cf0704ad12d6af2ad3bf47e03017fed