Партнерка на США и Канаду по недвижимости, выплаты в крипто

  • 30% recurring commission
  • Выплаты в USDT
  • Вывод каждую неделю
  • Комиссия до 5 лет за каждого referral

Подпись: 11 reg1 reg2Подпись: OC d w wwWw

7 2 1 0 7 6 5 3 2 0

 

1, if word 1, if reg1 is a destination

w = d =

0, if byte 0, if reg2 is a destination

For example:

**** 8B DA MOV BX, DX

OC=0Bh=100010 1 1

BAM= 0DAh=11 011 010

mod=11=> m/r=reg=010=DX =>w=1

reg=011=BX=> d=1(i. e. BX is a destination)

2)  “REGISTER-MEMORY” (2 or 4 bytes)

For example:

**** 88 1E 0000r MOV BL, msg; (here msg is a name of ASCII string variable in data segment)

OC=088h=100010 1 0

BAM= 01Eh=00 11 110

mod=00=> m/r =mem =>offset is absent

reg=011=BL=> d=1(i. e. BL is a destination)

w=0 (byte is addressed)

3)  “REGISTER-IMMEDIATE OPERAND” (3-4 bytes)

Подпись: im (0 or 2 bytes)Подпись: 11 OC’ reg Подпись:

For example:

**** 80 E3 CC AND BL,11001100b

OC=1000000w, (w=0)

BAM= 11 100 011

mod=11=> reg*dir. op =>offset is absent=>dir. op is present=11001100b

r/m=reg=011=BL

OC’= 100; w=0 (byte is addressed)

4)  Подпись: im (1-2 bytes)Подпись: adr(0-2 bytes)Подпись: 11 OC’ mem emПодпись: OC s w wwWw“MEMORY-IMMEDIATE OPERAND”(3-6 bytes)

For example:

**** 80 26 0000r CC AND msg, BL

OC=080h=10000000 (w=0)

BAM= 00 100 110

mod=00=> m/r =mem= 110 =>offset is present, offset = 00000000b, dir. op=11001100b

OC’=100

w=0 (byte is addressed)

Classification Instructions of Control Break.

According the microprocessor’s principle of action the instructions, which provide an organization of branches in a program, may be divided into three groups:

1.  Instructions of unconditional Control Break:

°  instructions of unconditional jumps;

°  calls of subroutines and returns from them;

°  calls of program interrupts and returns from them.

НЕ нашли? Не то? Что вы ищете?

2.  Instructions of conditional Control Break:

°  instructions of jumps according results of comparison instructions;

°  instructions of jumps according the state of flag;

°  instructions of jumps according constants of register CX.

3.  Instructions of loop control:

°  instruction of loop organization with the counter CX;

°  instruction of loop organization with the counter CX with a possibility of pre-term (досрочный) exit from the loop according additional condition.

Types of jumps.

As it’s known, the microprocessor executes instructions consequently in accordance with the order, in which they are placed in the program. But some times it may be necessary to change the order of execution, or pass the control to the other program. All these operations are fulfilled with help of jumps (branchings) instructions. Jumps instructions may be divided into: unconditional branches (the jump in the given point of the program without checking any conditions) and conditional branches (change of the sequence of program’s instruction executing depending upon a result of checking of certain condition). Unconditional branches are divided into: (proper) jumps (without return in the point, in which the sequence of program’s instructions has been interrupted) and calls of subroutines (with a return in the point, in which the sequence of program’s instructions has been interrupted, after the subroutines completing).

Operations of branches and programs calls touch upon the microprocessor’s architecture – segment memory addressing.

Unconditional jumps are realized with help of instruction jmp, which has 5 varieties:

·  the direct short (within the limits – 128 … +127 bytes);

·  the direct near (within the limits of the current code segment);

·  the direct far (in the other segment);

·  the indirect near (within the current instructions segment through the cell with an address of the jump);

·  the indirect far (in the other segment through the cell with an address of the jump).

Direct short jump.

Direct jump is such jump, in the instruction of which it is pointed in a direct form a label, on which it is necessary to jump. For the short jump the label must be placed in the same segment at the distance not more than 127 bytes (after the jump instruction) and not less than -128 bytes (before the jump instruction). Machinery code of this instruction is equal only 2 bytes (one byte for OC “EBh”, and one byte for the offset to the point of jump).

Direct Near(Internal) Jump.

This type of jump distinguishes from the previous one (i. e. direct short) by the size of offset (displacement) to the point of jump, which is equal to a whole word in this type of jump. It gives a possibility to execute a jump within the limits of the segment.

With help of instruction of direct near jump (instruction jmp without any modifier) it is possible to jump on any point of the given code segment.

Direct Far (Intersegment) Jump.

This type of jumps allows to hand over control in any point of any code segment of the program (it is supposed, that the program complex includes several code segments). The OC of direct far jump instruction is “EAh”, the length of the instruction is equal to 5 bytes (it includes the full address of point of jump, i. e. segment address + offset, and for this purpose it is necessary: 1 byte for OC + 4 bytes for the full address). In this case the instruction must include a modifier far ptr.

Indirect near (internal) jump.

Unlike the instructions of direct jumps, the instructions of indirect jumps allow to use different modes of addressing and have got different variants. The common feature of this type of instructions consists in using addresses which are not pointed in a direct form (with help of label), but are contained or in a memory cell, or in one of the registers. It allows to modify an address of jump, and to execute the jump in accordance with the known absolute (physical) address. Let’s consider an example, when an address is in the data segment. If the jump is near, then the cell with the address consists from a word and contains only the offset (displacement) to the point of jump.

Indirect far jump.

This jump is executed on an address, which is contained in the memory cell, but the size of cell must be 2 words, because a full address of the point of jump must be placed in it. The program in this case should include not less than 2 code segments.

Instructions of Conditional Jumps.

Instructions of conditional jumps allow to organize jumps to two parts of code depending on a given condition. For the Intel microprocessors there are limited number of such instructions, in which only one address of jump is pointed out; if a condition, given in the instruction is truth, then a jump will be executed on the pointed address, and if the given condition is false, then the next instruction will be executed.

The syntax of conditional instructions is the next:

jcc < label_of_jump >

here cc is a designation of some condition, which is checked in one or the other instruction. label_of_jump is an operand, which may be located only within the limits of the current code segment (and in the real address mode only short conditional jumps are possible). Among all existed instructions of conditional jumps there are three types, which are more often used and allow to check up:

§  relation between signed operands (“greater or less”;

§  relations between unsigned operands (“above or below”);

§  state of arithmetic flags zf, sf, cf, of, pf.

Instructions of Conditional Jumps and Flags.

Mnemonic designation of some instructions of conditional jumps reflects the name of flag, with which the given instruction is working. and have the following structure:

-  the first letter (symbol) is j (jump);

Из за большого объема этот материал размещен на нескольких страницах:
1 2 3 4 5 6