Delphi Language Guide Delphi for Microsoft Win32 Delphi for the Microsoft. Net framework



Yüklə 0,84 Mb.
Pdf görüntüsü
səhifə273/294
tarix02.01.2022
ölçüsü0,84 Mb.
#41395
1   ...   269   270   271   272   273   274   275   276   ...   294
DelphiLanguageGuide

RET instruction sizing
The RET instruction opcode always generates a near return.
Automatic jump sizing
Unless otherwise directed, the built-in assembler optimizes jump instructions by automatically selecting the shortest,
and therefore most efficient, form of a jump instruction. This automatic jump sizing applies to the unconditional jump
instruction (JMP), and to all conditional jump instructions when the target is a label (not a procedure or function).
For an unconditional jump instruction (JMP), the built-in assembler generates a short jump (one-byte opcode followed
by a one-byte displacement) if the distance to the target label is 128 to 127 bytes. Otherwise it generates a near
jump (one-byte opcode followed by a two-byte displacement).
For a conditional jump instruction, a short jump (one-byte opcode followed by a one-byte displacement) is generated
if the distance to the target label is 128 to 127 bytes. Otherwise, the built-in assembler generates a short jump with
the inverse condition, which jumps over a near jump to the target label (five bytes in total). For example, the assembly
statement
JC    Stop
where Stop isn't within reach of a short jump, is converted to a machine code sequence that corresponds to this:
     JNC    Skip
     JMP    Stop
     Skip:
Jumps to the entry points of procedures and functions are always near.

Yüklə 0,84 Mb.

Dostları ilə paylaş:
1   ...   269   270   271   272   273   274   275   276   ...   294




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin