Вы находитесь на странице: 1из 92

Instruction set of

8086 Microprocessor
By

Manish Singhal

c
Software

ëhe sequence of commands used to tell a microcomputer what to


do is called a program,
Each command in a program is called an instruction
8088 understands and performs operations for 117 basic
instructions
ëhe native language of the IBM PC is the machine language of the
8088
A program written in machine language is referred to as machine
code
In 8088 assembly language, each of the operations is described by
alphanumeric symbols instead of 0-1s.

ADD AX, BX

(Opcode) (Destination operand) (Source operand )

i
Instructions
LABEL: INSë CëION ; COMMENë
Address identifier Does not generate any machine code


   

 !"
!#$#$

!"!"!!%#!
#&#$#$%%"
'
!#$#$!"&%
($&" !#$##!


ëwo key benefits of assembly language
programming

± It takes up less memory

± It executes much faster

Ë
Applications
One of the most beneficial uses of
assembly language programming is
real-time applications.

eal time means the task required by the


application must be completed before any other
input to the program that will alter its operation can
occur
For example the device service routine which
controls the operation of the floppy disk drive is a
good example that is usually written in assembly
language
Ò
Assembly language not only good for
controlling hardware devices but also
performing pure software operations

± Searching through a large table of data for a special


string of characters
± Code translation from ASCII to EBCDIC
± ëable sort routines
± Mathematical routines

Assembly language: perform real-time operations

High-level languages: used to write those parts


that are not time critical

Converting Assembly Language Instructions
to Machine Code
An instruction can be coded with 1 to 6 bytes
Byte 1 contains three kinds of information
± Opcode field (6 bits) specifies the operation (add, subtract,
move)

± egister Direction Bit (D bit) ëells the register operand in EG


field in byte 2 is source or destination operand
1: destination 0: source

- Data Size Bit (W bit) Specifies whether the operation will be


performed on 8-bit or 16-bit data
0: 8 bits 1: 16 bits


Byte 2 has three fields
± Mode field (MOD)
± egister field ( EG) used to identify the register for the first operand
± egister/memory field ( /M field)

÷
_    
 
 
  
Mnemonic Meaning Format Operation Flags affected
MOV Move Mov D,S (S)  (D) None

_    
 
  

  


    

   

!
!
    )!!" #!#
    #!# #!#
   
   
 
 
 
   
** •
_    
 
 
  

Mnemonic Meaning Format Operation Flags affected

XCHG Exchange XCHG D,S (S) (D) None

_    
 


   
!" #$ %&'()*+,

   

   


    È  ,-.



..

c+
_    
 - .!+._+.!
Mnemo Meaning Format Operation Flags
nic affected
LEA Load LEA eg16,EA EA  ( eg16) None
Effective
Address
LDS Load LDS eg16,MEM32 (MEM32)  ( eg16) None
egister
And DS (Mem32+2)  (DS)

LES Load LES eg16,MEM32 (MEM32)  ( eg16) None


egister
and ES (Mem32+2)  (DS)

.! _ / 0 _


cc
). 
 
Mnemonic Meaning Format Operation Flags
XLAë ëranslate XLAë ((AL)+(BX)+(DS)0)  (AL) None

ï 

 





 





!


!
"
#"$
% 
& 
& 


&

&
 

 
$ 
 
 
ci
 )  
 $__+_+ ++_

Mnemonic Meaning Format Operation Flags


affected

ADD Addition ADD D,S (S)+(D)  (D) ALL


carry  (CF)

ADC Add with ADC D,S (S)+(D)+(CF)  (D) ALL


carry carry  (CF)

INC Increment by INC D (D)+1  (D) ALL but CY


one

AAA ASCII adjust AAA If the sum is >9, AH AF,CF


for addition is incremented by 1

DAA Decimal DAA Adjust AL for decimal ALL


adjust for Packed BCD
addition

c
Examples:

Ex.1 ADD AX,2


ADC AX,2

Ex.2 INC BX
INC WO D Pë [BX]

Ex.3 ASCII CODE 0-9 = 30-39h

MOV AX,38H ; (ASCII code for number 8)


ADD AL,39H ; (ASCII code for number 9) AL=71h
AAA ; used for addition AH=01, AL=07
ADD AX,3030H ; answer to ASCII 0107 AX=3137

Ë *iÒ/0",12
*ҏ/0",12 25
+ 56
11** --------
1 7B 81


 )  
 - 1,+,,+_!++_+!

Mnemonic Meaning Format Operation Flags


affected
SB Subtract SB D,S (D) - (S)  (D) All
Borrow  (CF)
SBB Subtract SBB D,S (D) - (S) - (CF)  (D) All
with
borrow
DEC Decrement DEC D (D) - 1  (D) All but CF
by one
NEG Negate NEG D All

DAS Decimal DAS Convert the result in AL to All


adjust for packed decimal format
subtraction
AAS ASCII AAS (AL) difference CY,AC
adjust for (AH) dec by 1 if borrow
subtraction

Examples: DAS

MOV BL, 28H


MOV AL, 83H
SB AL,BL ; AL=5BH
DAS ; adjust as AL=55H

MOV AX, 38H


SB AL,39H; AX=00FF
AAS ; AX=FF09 ten¶s complement of -1 (Borrow one from AH )
O AL,30H ; AL=39


Multiplication and Division

c
Multiplication and Division


Multiplication and Division

 #   
 #  #  

/1.  1.0 /
 # 0
,2, .     

3 23       _$

_4 2_4  !     !$!_

_ 5   _ 5  #  6


 $ 
/_   _ 0 /_ 5  0

3 7,      .$

_4 73  _$     $_

64 7_4  !_$!     !$!_


Multiplication and Division Examples

!"$  
$
$
" "


$
' 


()


)




* +,

- 
*


()
.
)

(/
- 

(/

0* 1+,

- 
*
 
02 
.
 
02 ()
.
)

3
.
)

/33- 02
 - ï4(/
- *

() V - *
* 15

- 


0 ()60.)
-
) V  0
- *
() V
7* 1 15

- 


 0
) V

i+
!"&$ .89'+,.8:+8;;
* +,

-


.


8
.

/

(/
-


(/

0* 1+,

-

.

 02 
. 02  
02 8
. 02 /

 
.
48

)
-
*
   V   V
*1 15

-


0-
8
9 0.48)
u 0:  /V  4 V



 



cÒ +i  ´ È  i3/+i245- cÒ 5
È 
6

  V 



7*

15

-

- 86./40
-
40 
u /V
6

ic
!"'$ 89;;;+,8:;<+_8;;;;



*
+,


8
.
/)

 ÷c +++



0*
1+,

 02 8
. 02 /)


.
48ï
 +5 +++

  V
*
15




4 
- +
$
88 -
"'"
ï*
) V

0    V   V
7*
1 15

- 


; <
38 -
"'"
ï*
) V ) V

ii
!"($ 8&<;+,.8:;

 0) V   0) V 0) V


* 1 15


-

u / V È  0 È  0  / V  3 V

4i•-/62/ciÒ+' i•7+24+-/
2

i•-/þ 2i3 /i•-241-


6
+- 1-

0) V 6
 Ò+- i+-
i1) *44i+-ciÒ+i+7•+4Ò+-
u / V -*

i
Logical Instructions
     9   #   9  
_ .  _ __+ /0=/_0ĺ /_0 9+9+@9+A9+
 9
 .    
 5 _+ /0>/_0ĺ /_0 9
 
 9+9+@9+A9+
9
 .  !" 
 5 _+ /0 ù /_0ĺ/_0 9
 
 9+9+@9+A9+
? 9
 . . _ /_0ĺ /_0 9
 
 

_    
 
_   
   
     
     
   
   


    


LOGICAL Instructions

˜
=
9 ,
!
">

 
!66!


>
>"
9 ï"!

"
">
"
"
?">


_





$
"
 
"
9 ï 
=

8
=

@7)A

˜
BC
9 ,
"
">
"
"








$

 
"


˜ BC
9 ,
"
1'">
"



BC



2 2 2 2

!" #$;
"




"
4

3
"'
"
)


>"
;

=
;
B8; D


BC
;
; D


BC
;
0 D 



Shift and otate Instructions
SH /SAL: shift logical left/shift
arithmetic left
 SH : shift logical right
 SA : shift arithmetic right
 OL: rotate left
 O : rotate right
 CL: rotate left through carry
 C : rotate right through carry

i
*#&!%
#%% "
8


h

˜ 
"$"
$"
"
$
#!

"

""
#"$

!

$
  2
">
"

h

Shift Instructions
    9   #   9 
  
.7 )  .7._+
 )  ) /_0  B ) 9+A9+9+@9
.  ) 
B  B  #    9
 
.7)  C
 
    ) 9
 
.   5  B  #     
E
)  ) 4 ) D 

)  ) /_0  ) B ) 9+A9+9+@9


 )  _+
 
B  B  #    9
 
   C
 
    ) 9
 
 ) 5  B  #     
E
)  4 ) D 

)  ) /_0  ) B ) 9+A9+9+@9


)  _+
 
B  B  #    9
 
  ) C
 
    ) 9
 
 ) 5  B  #     
E
)  4 ) )    
      B  i•
Allowed operands

_    


  

  .

  

  .

+
 

 

c
SHL Instruction

-*/%%2$%!#
%%""%#
  +


h

"
@ Y 
@  
@ Y 
@   i
Fast Multiplication
Shifting left 1 bit multiplies a number by 2
r    
          

 
 
          

Shifting left Ê bits multiplies the operand by



5!Ò7ii 4i+
r 
    



$  c+
-* c

 

,*i
-* ,*
11 


SH Instruction

-/%#2$%!#
#%""#
%" 8


h

%##Ê "&""iÊ
Ô  
@  
 
@    


SA Instruction

SA (shift arithmetic right) performs a right


arithmetic shift on the destination operand.

!%&$!9#

Ô  
@ 
 
@   


otate Instructions
    9   #   9  
 
.    ._+
   )/_0B) 9
. 
B B #   C
 9
 
 
F! )B ) 
 
E
 ) B  B G
 ) ) B #   F
    _+
   )/_0 )B) 9
 ) 
B B #   C
 9
 
 
F! )B ) 
 
E
 ) ) B  
B G  ) B 
#   F
.    ._+
   ." #   9
.  ) /_0    F 9
 
)
) 
E
 
    _+
   " #   9
 )  ) /_0    F 9
 
)
) 
E 
 
OL Instruction
OL (rotate) shifts each bit to the left
ëhe highest bit is copied into both the Carry
flag and into the lowest bit
No bits are lost

Ô 


 





Ô  
    

O Instruction
O (rotate right) shifts each bit to the right
ëhe lowest bit is copied into both the Carry flag and
into the highest bit
No bits are lost

Ô 


 




Ô  
    

CL Instruction
CL (rotate carry left) shifts each bit to the left
Copies the Carry flag to the least significant bit
Copies the most significant bit to the Carry flag

 
Ô  










Ë+
C Instruction
C (rotate carry right) shifts each bit to the right
Copies the Carry flag to the most significant bit
Copies the least significant bit to the Carry flag

@ 

Ô  
  


 
 


Ëc
otate Instructions

_    


  

  .

  

  .

Ëi
Flag control instructions
MNEM- MEANING OPE AëION Flags
ONIC Affected
,*, ,,5# /,52 + ,5
, ,5# /,52 c ,5
,
, ,!! /,52 /,52l ,5
,5#
,*1 ,1 /152 +
5# ) : 1)   $ !"  15
# $  $"
1 1 /152 c
5# ) : 1)   $ "!" 15
 # $  $"
,*) ,)$ /)52 + )5
5#
) )$ /)52 c )5
5# Ë
Compare Instruction, CMP
Mnemo Meaning Format Operation Flags
nic Affected

,
; ,! ,
;1 (D) ± (S)  $"  ,55 5
#  #  ;55<5
%#

Allowed Operands
Destination Source
(D) = (S) ; ZF=1
egister egister
(D) > (S) ; ZF=0, CF=0 egister Memory
(D) < (S) ; ZF=0, CF=1 Memory egister
egister Immediate
Memory Immediate
Accumulator Immediate
ËË
String?

An array of bytes or words located in


memory
Supported String Operations
' Copy (move, load)
' Search (scan)
' Store
' Compare

ËÒ
String Instruction Basics

Source DS:SI, Destination ES:DI

' =$!$$1"
' =$!$$)"1)%%1
"&

15#/+4>c41 2

' ,*1 )!""/%#2


' 1 1!""/#%2 ˏ
String Instructions
Instruction prefixes

Prefix sed with Meaning

EP MOVS epeat while not end of string


SëOS CX E;

epeat while not end of string


EPE/ EPZ CMPS and strings are equal. CX E;
SCAS and ZF = 1

EPNE/ EP CMPS epeat while not end of string


NZ and strings are not equal. CX 
SCAS 0 and ZF = 0 Ë
Instructions

Mnemo- meaning format Operation Flags


Nic effect
-ed


&#
? //2+ù/1)22 //12+ù/)22 
1 ) 1)
@ /)2 /)2 ci
/1)2 /1)2 ci

,
; ,! ,
;? %# 
# ,
;@ //12+ù/)22 //2+ù/1)22 $
1 ) 1) /)2 /)2 ci %#
/1)2 /1)2 ci

Ë÷
Mnemo- meaning format Operation
Nic
, # ,? %#
 '  1) ,@ /* 2 //2+ù/1)22
/1)2 /1)2 ci

* 1 *"# * 1? /* 2 //12+ù/)22


1 )  * 1@ /)2 /)2 ci

  #  ? //2+ù/1)22 /*2: ci


 1)   @ /1)2 /1)2 ci

˕
Branch group of instructions
Branch instructions provide lot of convenience to the
programmer to perform operations selectively, repetitively
etc.

#$%$

," >" ) ,** $


A$!  $ $ $
A$!

Ò+
SB OëINE & SB OëINE HANDILING INSë CëIONS

Main program

Subroutine A

First Instruction
Call subroutine A
Next instruction

eturn
Call subroutine A
Next instruction

Òc
È $$#!%#!"%
$%!#!
È !#$#$$%"B"$C
È @& "$$#$"
!"%#!$$
È $$&$);,");!$
!"%"
È %$  $$
!!"% "$$#&$
%);,");!$&"
È $%$$%);&"
0/!/;2 /;2i 2
È  c/!!c#c)#!2&$
%"$""");
È !  ,**ciË-
CALL BX
CALL [BX]
Òi
Inter Segment

' At starting CS and IP placed in a stack.


' New values are loaded in to CS and IP given by the
operand.
' After execution original CS, IP values placed as it is.

Far-proc
Memptr32

ëhese two words (32 bits) are loaded directly into IP and
CS with execution at CALL instruction.
First 16  IP
Next 16  CS

Ò

!
# 5!  5#
 %%"

,** $$ ,**" $ $ %! 


  "" % 
$$ %" 
 " )%!
($"  $ 0 
 ! #! $ 
); " ,  &" 
 0

Operand
Near-proc
Far ± proc
Memptr 16
egptr 16
Memptr 32 ÒË
Eë N
& $$ !$ "  $#  $  $ 
  ! #!    $ /2 $

 $  &$ % );  ); " ,   &"   0 


 $" 0   "# # / ! /;2  /;2ùi 2

!
# 5!  5#
 %%"
 $  $   ! È
" #!  # );
/" , % %2 )%
"    
"""    %
;

Operand
None
ÒÒ
Disp16
Loop Instructions
 $  $"     % $ &
!
5! * ;*
 /, 2 /, 2c
D$!  8"   "%"    % , E+
  $  ($ $
)$ * ; 0   % ,  , !$ 
""   $    $! % ! 
    
@&    $"   ,  %
"!"  0"  "! %   ($  8
)% , 4+   ! "  $ % #  
$"
)% , E +  $   $    %" 
  $
ҏ
LOOP Instruction contd.

General format : LOOP r8 ; r8 is 8-bit signed value.

It is a 2 byte instruction.

sed for backward jump only.

Maximum distance for backward jump is only 128 bytes.

LOOP AGAIN is almost same as: DEC CX


JNZ AGAIN

LOOP instruction does not affect any flags.


Ò

! !# %! 

* ; * * /, 2 /, 2' c


D$!#&
%, E+

* ;? *  * ;?* ;< /, 2 /, 2' c


* ;< ($?  D$!#&
8 %, E+"
<54c
* ;È? *  * ;È?* ;È< /, 2 /, 2' c
* ;È< ($?  D$!#&
  %, E+"
8 <54+

Ò÷
Control flow and JMP instructions
nconditional Jump

Part 1
JMP AA
nconditional JMP

Part 2
Skipped part

Part 3
AA XXXX Next instruction

JMP  unconditional jump


JMP Operand
ҕ
nconditional Jump

>"D$!)$

ÈD$! 5D$!
)#!D$! )#!D$!
/D$! #!2 /D$!"%%#!2
Is limited to the address with in Permits jumps from one code
the current segment. It is achieved segment to another. It is
by modifying value in IP achieved by modifying CS and IP
Operands
Short label
Near label
Far label )#!D$!
Memptr16
egptr16
+
memptr32 )#!D$!
Conditional Jump

Part 1

Jcc AA Conditional Jump

Part 2
NO
Skipped part
condition XXXX

YES

Part 3
AA XXXX Next instruction

c
Conditional Jump instructions

Conditional Jump instructions in 8086 are just 2 bytes long. 1-byte


opcode followed by 1-byte signed displacement (range of ±128 to
+127).

Conditional Jump Instructions

Jumps based on Jumps based on


a single flag more than one flag

i
Conditional Jump Instructions

Mnemonic : Jcc
Meaning : Conditional Jump
Format : Jcc operand
Operation : If condition is true jump to the address specified by operand.
Otherwise the next instruction is executed.
Flags affected : None


ëYPES

Mnemonic meaning condition

D & ,54+"<54+

D &($ ,54+

D  ,54c

D  ($ ,54c<54c

D, , ,54c

D, < , #< /,5<524+

D ($ <54c

D. . <54+"54 5

D. .($ 54 5

D* * /5  524c Ë


Mnemonic meaning condition

D* *($ //5  52<524c

DÈ È& ,54c<%4c

DÈ È&($ ,54c

DÈ È ,54+

DÈ È ($ ,54+"<54+

DÈ, È, ,54+

DÈ È($ <54+

DÈ. È. //5  52<524c

DÈ. È.($ /5  524c

DÈ* È* 54 5

Ò
Mnemonic meaning condition
DÈ* È*($ <54+"54 5
DÈ È &% 54+
DÈ; È; ;54+
DÈ< È< <54+
DÈ È# 54+
D &% 54c
D; ; ;54c
D; ;& ;54c
D; ; "" ;54+
D # 54c
D< < <54c


Jumps Based on a single flag
JZ r8 ;Jump if zero flag set to 1 (Jump if result is zero)
JNZ r8 ;Jump if Not Zero (Z flag = 0 i.e. result is nonzero)
JS r8 ;Jump if Sign flag set to 1 (result is negative)
JNS r8 ;Jump if Not Sign (result is positive)

JC r8 ;Jump if Carry flag set to 1


ëhere is no jump
JNC r8 ;Jump if No Carry based on AC flag
JP r8 ;Jump if Parity flag set to 1 (Parity is even)
JNP r8 ;Jump if No Parity (Parity is odd)
JO r8 ;Jump if Overflow flag set to 1 (result is wrong)
JNO r8 ;Jump if No Overflow (result is correct)

JZ r8 ; JE (Jump if Equal) also means same.
JNZ r8 ; JNE (Jump if Not Equal) also means same.
JC r8 ;JB (Jump if below) and JNAE (Jump if Not Above
or Equal) also mean same.
JNC r8 ;JAE (Jump if Above or Equal) and JNB (Jump if
Not Above) also mean same.
JZ, JNZ, JC and JNC used after arithmetic operation
JE, JNE, JB, JNAE, JAE and JNB are used after a
compare operation.
JP r8 ; JPE (Jump if Parity Even) also means same.
JNP r8 ; JPO (Jump if Parity Odd) also means same.

÷
Examples for JE or JZ instruction

ï 
/ !%D#&2

,
;)1)

JE SAME

$" 11, 1 $"%<4+


F4ci
 /%)($1)2


 >  $"%<4c

/%)41)2

•
Examples for JE or JZ instruction

ï  

,G >  $"%<4c
$" /%)41)2
F4ci÷

,
;)1)
JE BACK
11, 1 $"%<4+
/%)($1)2

+
Jumping beyond -128 to +127?

ß 
 Ê  Ê
,
;)1) ,
;)1)
D
 DÈÈ 
@% 11, 1 D
;

Hci
È  11, 1



 > 

 > 
#%D
;/$"A$!2ùicÒ 4ù iGD
;$
"$""

c
ëerms used in comparison

&" $"%!#>#"
."$" #"$!
)!$&

•Ò-&Ò- >#"! $


•Ò-Ò- #"! $
•Ò-#&Ò-&

Ò- •Ò- >#"! $


Ò-#•Ò- #"! $
i
Jump on multiple flags
,"D$!"!%#$"%,
;
/!2$

D D$!% ($


DÈ D$!%È&


 
 ï 

,4c <4c ,4+È1<4+ ,


; ,

  ($ $& D I

 I/  ($2!



Jump on multiple flags contd

DÈ D$!%È/ ($2


D D$!%&


 
 ï 

,4+È1<4+ ,4c <4c ,


; ,
$&   ($ D &
 &/ &2!


Jump on multiple flags contd
contd

D* D$!%* ($


DÈ. D$!%È.


 


4cÈ1 4+ 4+È1 4+


/$#&2 /$&2
/4+È1 4c2 /4cÈ1 4c2
/ # &J2 / # #&J2
<4c/($2 È1<4+/($2

  4c <4c   4+È1<4+


Jump on multiple flags contd.
DÈ* D$!%È/* ($2
D. D$!%.


 


4+È1 4+ 4cÈ1 4+


/$&2 /$#&2
/4cÈ1 4c2 /4+È1 4c2
/ # #&J2 / # &J2
È1<4+/($2 <4c/($2
  4+È1<4+   4c <4c


Jump on multiple flags contd.

D* D$!%*
DÈ. D$!%È/. ($2


 

4cÈ1 4+ 4+È1 4+
/$#&2 /$&2
/4+È1 4c2 /4cÈ1 4c2
/ # &J2 / # #&J2

  4c   4+


@4c$+ @4+$+


Jump on multiple flags contd.

DÈ* D$!%È*
D. D$!%. ($


 

4+È1 4+ 4cÈ1 4+
/$&2 /$#&2
/4cÈ1 4c2 /4+È1 4c2
/ # #&J2 / # &J2

  4+   4c


@4+$+ @4c$+


Near Jump

ÈD$!
1D$! )"D$!
/!!2 /$!!2

D$! *#D$!
i!
i 
# 55-
÷ •c # !
#!
#ù i #ùicÒ

ÈD$!"i5D$!$&!!!
D
;$"%%"


Short Jump
i/÷2$# ci÷ùci

u
 !0 ($$!%A$!
.D$!"%F4ci÷($"A$!
."%*#D$!%Hci÷($"A$!


 !"30 A$!($$!c
!&%% "A$!$
)%A$!"$$Hci÷$
""•c/•-4*#A$!"2
)%A$!"!F4ci÷$""
÷% ""%È ;/÷-4A$!"2

÷+
Short Jump contd.

- !1&
!#iD$!"%% "A$!%
- !"&$"
D
;SHO ë 

;#!!$"$
D$!"F4ci


, 1

÷c
Long Jump

/•c2$# i÷ùi
*#D$!&ËG%,"#!
, ++++-

*#D$! , ÷+++- D
;5@1
"A$!
($$!F4i

5@14 , 5555-

÷i
Long Jump contd.

)&ËG%,"#!

*#D$! G@14 , ++++-


"A$!
($$!
F4i÷ , ÷+++- D
;G@1


, 5555-

÷
Long Jump or Short Jump?

, ++++-
D$!"
," , +++1- D
;5@1 455+-
! &#
/i+-20 " , ++c+-
% "A$!
J
5@14 , 555+-
, 5555-

÷Ë
Long Jump or Short Jump?

, ++++-
D$!"
," G@14 , ++c+- 455+-
! &#
/i+-2% "
0 "A$!
J D
;G@1
, 555+-
, 5555-

÷Ò
Intra segment indirect Jump

È)"D$!$!!
)$# i!
# !#!

c D
;1
)%1 4ciË-, ciË-
ciË-#"&"!

i D
; "i+++-K L
 ciË- 1 iË- ҏ÷- 

1 i- ii- , ҏ÷-

÷
Far Jump
5D$!

1D$! )"D$!
/!!2 /$!!2

Ò
i!
i%%i#!
# 55-
#  
#  

3 Near Jump and 2 Far Jump instructions have the same mnemonic
JMP but different opcodes

÷
Inter segment Direct Jump

Also called Far Direct Jump


It is the common inter segment jump scheme

It is a 5 byte instruction
1 byte opcode (EAH)
2 byte offset value
2 byte segment value

Ex. JMP Far ptr LOC

÷÷
Inter segment Indirect Jump

Instruction length depends on the way jump location is


specified
It can be a minimum of 2 bytes

 D
;1@ 1;i+++-K L

֥
Inter segment Indirect Jump

"5)"D$!
)!!$"
)$#!!$!%i
)"" A$!%"
D
;1@ 1;i+++-K L

 ciË- 
,1- ҏ÷-
1 iË- ҏ÷- )Ë$
1 i- ,1-

•+
Machine control instructions
HLë $' -*#
 -* $  $  ÷+÷   %# " $#
$  ÷+÷          #  
$ %       $ #   )È    $
#  È
)     #    $

NOP $
 $ ! 0 $  0  " " 
# %    $   $  $ 
! $"  &" "    $

ESC $
&$$!"È ;
"%!!!%$
%!÷+÷!%,$&"
"
÷+÷%$0$
"$($$ !÷+÷
$È ;5#$$"÷+÷"
"$#÷+÷ @)

•c
Machine control instructions contd
LOCK $
   %   $  % !0 $  "$#
$ %  $  % ! $   0  
!
 !$ ! "&"$ !  "
#   ! $      !! $ 
  0  %  $    "  $ !!
$
 0 %  $    !"" %  $ !
$   0      &"  "  #
M* ,G3 &   %  ,;>   #   !" &
"$#  $ "   $"   $  #  &
 %! 0#  $
  $  !" 0 # ! & "
!  0  ! $

WAIë $
 $ 0 ÷+÷   " "  ,;>   "
 # "$#  )  $    "  $  
% ÷+÷ !    $ #  &"  )È  È
) 
&" $ )  $" "    "  #
•i

Вам также может понравиться