Intel 80286, 80287 manual Flags Modified, Flags Undefined, Operation, Call

Models: 80287 80286

1 515
Download 515 pages 45.04 Kb
Page 233
Image 233

THE 80286 INSTRUCTION SET

CALL-Call Procedure

Opcode

Instruction

Clocks'

Description

E8

cw

CALL

cw

7

Call near, offset relative to next instruction

FF

/2

CALL

ew

7,mem=11

Call near, offset absolute at EA word

9A

cd

CALL

cd

13,pm=26

Call inter-segment, immediate 4-byte address

9A

cd

CALL

cd

41

Call gate, same privilege

9A

cd

CALL

cd

82

Call gate, more privilege, no parameters

9A

cd

CALL

cd

86+4X

Call gate, more privilege, X parameters

9A

cd

CALL cd

177

Call via Task State Segment·

9A

cd

CALL

cd

182

Call via task gate

FF

/3

CALL

ed

16,mem=29

Call inter-segment, address at EA doubleword

FF

/3

CALL

ed

44

Call gate, same privilege

FF

/3

CALL

ed

83

Call gate, more privilege, no parameters

FF

/3

CALL

ed

90+4X

Call gate, more privilege, X parameters

FF

/3

CALL

ed

180

Call via Task State Segment

FF

/3

CALL

ed

185

Call via task gate

·Addone clock for each byte in the next instruction executed.

FLAGS MODIFIED

None, except when a task switch occurs

FLAGS UNDEFINED

None

OPERATION

The CALL instruction causes the procedure named in the operand to be executed. When the procedure is complete (a return instruction is executed within the procedure), execution continues at the instruc- tion that follows the CALL instruction.

The CALL cw form of the instruction adds modulo 65536 (the 2-byte operand) to the offset of the instruction following the CALL and sets IP to the resulting offset. The 2-byte offset of the instruction that follows the CALL is pushed onto the stack. It will be popped by a near RET instruction within the procedure. The CS register is not changed by this form.

The CALL ew form of the instruction is the same as CALL cw except· that the operand specifies a memory location from which the absolute 2-byte offset for the procedure is fetched.

The CALL cd form of the instruction uses the 4-byte operand as a pointer to the procedure called. The CALL ed form fetches the long pointer from the memory location specified. Both long pointer forms consult the AR byte in the descriptor indexed by the selector part of the long pointer. The AR byte can indicate one of the following descriptor types:

l.Code Segment-The access rights are checked, the return pointer is pushed onto the stack, and the procedure is jumped to.

B-23

Page 233
Image 233
Intel 80286, 80287 manual Flags Modified, Flags Undefined, Operation, Call