Assembly Language StepbyStep Programming with DOS and Linux 2nd Ed [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Assembly Language StepbyStep Programming with DOS and Linux 2nd Ed [Electronic resources] - نسخه متنی

Jeff Duntemann

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید









CALL Call Procedure




Flags affected:



O D I T S Z A P C OF: Overflow flag TF: Trap flag AF: Aux carry
F F F F F F F F F DF: Direction flag SF: Sign flag PF: Parity flag
<none> IF: Interrupt flag ZF: Zero flag CF: Carry flag


Legal forms:



CALL <near label>
CALL <far label>
CALL r16
CALL m16
CALL r32 386+
CALL m32 386+


Examples:



CALL InsideMySegment ;InsideMySegment is a Near label
CALL OutsideMySegment ;OutsideMySegment is a Far label
CALL BX
CALL EDX
CALL WORD [BX+DI+17] ;Calls Near address at [BX+DI+17]
CALL DWORD [BX+DI+17] ;Calls full 32-bit address at [BX+DI+17]


Notes:


CALL transfers control to a procedure address. Before transferring control, CALL pushes the address of the instruction immediately after itself onto the stack. This allows a RET instruction (see also) to pop the return address into either CS:IP or IP only (depending on whether it is a Near or Far call) and thus return control to the instruction immediately after the CALL instruction.

In addition to the obvious CALL to a defined label, CALL can transfer control to a Near address within a 16-bit general-purpose register, and also to an address located in memory. These are shown in the Legal Forms column as m16 and m32. m32 is simply a full 32-bit address stored at a location in memory that may be addressed through any legal x86 memory-addressing mode. CALL m16 and CALL m32 are useful for creating jump tables of procedure addresses.

There are many more variants of the CALL instruction with provisions for working with the protection mechanisms of operating systems. These are not covered here, and for more information you should see an advanced text or a full assembly language reference.


r8 = AL AH BL BH CL CH DL DH r16 = AX BX CX DX BP SP SI DI
sr = CS DS SS ES FS GS r32 = EAX EBX ECX EDX EBP ESP ESI EDI
m8 = 8-bit memory data m16 = 16-bit memory data
m32 = 32-bit memory data i8 = 8-bit immediate data
i16 = 16-bit immediate data i32 = 32-bit immediate data
d8 = 8-bit signed displacement d16 = 16-bit signed displacement
d32 = 32-bit unsigned displacement


/ 166