Microprocessor Just an intro m An Integrated chip with the multi programmable capability. m It is a general purpose chip with some integrated memory as well processing unit. m The normal computers have a microprocessor with some external central processing units. It is called microcomputer. m Speed of the microprocessor decided by the number of clock cycles ed for an instruction execution.
Microcontroller Just an intro m The purpose of microcontroller is a specific. m Normally the embedded system applications developed by using microcontroller.
Macro instructions/ Micro instructions m The macro instructions introduced to increase the flexibility of the programmer and to reduce the code size. m The macro instructions will be converted as micro instructions. That will only understandable by the machine. m The micro instructions will have the micro level operation with the control function. Such as movement, fetch, memory read.
Ôe nstructions type in 8086 m m m m m m m m m
Arithmetic instructions (6 SUB MUL 3 ogical Instructions (6 OR XOR3 aegister transfer instructions (MO XCHG3 Shift instructions (SHL SHR3 aotate Instructions (ROR ROL RCL RCR3 The Bit operation (Ô SÔ3 I/O instructions ( OUÔ3 String instructions (MOS LO S3 ërogram flow control instructions (JMP C6LL R Ô HLÔ3
MUL (unsigned Multiplication) m This MU instruction used to multiply the unsigned number. m The Multiplication is manually can be done by repeated addition. Syntax : MUL operand Operand may be reg/mem : 8/16 for 8bit (byte multiplication3 6X := 6L*operand; 6L is a silent operand opcode : F6 for 16bits operands (byte multiplication3 6X : X = 6X*operand; 6X is a silent operand opcode : F7 |
The basic principle is, for n-bit multiplication the result range must exceed the limit of n-bits. So, 2*n bits allotted to store the result. Flags affected : CF ,OF Operand
Clock cycles
8-bit aeg 16-bit aeg 8-bit Mem 16-bit Mem
70 ± 77 118 ± 133 (76 ± 833 + EA (124 ± 1393 + EA
Instruction code format
:
Instruction size(bytes3 2 2 2-4 2-4
1111011w mod100r/m
Ô å å Ô !Ô ^ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" #$ % & ' ()**++$# åå, , å#,å #-./.# /$#".#/0#$, .Ô ^
MUL (signed Multiplication) m IMU instruction used for the signed multiplication. m Syntax : MUL operand Operand may be reg/mem : 8/16 for 8bit (byte multiplication3 6X := 6L*operand; 6L is a silent operand opcode : F6 for 16 bits (Word multiplication3 6X: X = 6X*operand ;6X is a silent operand opcode : F7
Flags affected : CF ,OF Operand 8-bit aeg 16-bit aeg 8-bit Mem 16-bit Mem
Instruction format :
Clock cycles
Instruction size(bytes3
80-98 128 ± 154 (86 ± 1043 + EA (134 ± 1603 + EA
2 2 2-4 2-4
1111011w mod101r/m
Ô " 1 å å !" å !0! !Ô ^ ^ """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" ,# " Ô#" Ô2 & 345 1 62Ô728345/ "å 0% !! ^ ^
(unsigned
ivision)
m ÀIV instruction performs the unsigned division. m The division may be done by repeated subtraction. Syntax : operand;
Operand may be reg/mem : 8/16
for 8bit (byte Manipulation3 6L = 6X / operand; 6X is a silent operand 6H = remainder (modulus) opcode : F6
for 16 bits (Word multiplication3 6X = ( X 6X) / operand; 6X: X is a silent operand X = remainder (modulus) opcode : F7 6X must contain te dividend before instruction.
X be sould be cleared
Flags Affected : CF ,OF ,SF ,PF But the affection of the flags don¶t have any valid usage.
Operand
Clock cycles
8-bit aeg 16-bit aeg 8-bit Mem 16-bit Mem Instruction format
Instruction size(bytes3
80 - 90 144 - 162 (86 ± 963 + EA (150 ± 1683 + EA :
2 2 2-4 2-4
1111011w mod110r/m
Ô ,1 å9 å: å %
å
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" , Ô#" ,1 !!^^
(signed
ivision)
m IÀIV instruction performs the signed division. m The sign of the remainder is always same as the sign of the dividend Syntax : operand; Operand may be reg/mem : 8/16 for 8bit (byte manipulation3 6L = 6X / operand; 6X is a silent operand 6H = remainder (modulus) opcode : F6
for 16 bits (Word multiplication3 6X = ( X 6X) / operand; 6X: X is a silent operand X = remainder (modulus) opcode : F7 Flags Affected : CF ,OF ,SF ,PF Operand
Clock cycles
8-bit aeg 16-bit aeg 8-bit Mem 16-bit Mem
101 ± 112 165 ± 184 (107 ± 1183 + EA (171 ± 1903 + EA
Instruction code format :
Instruction size(bytes3 2 2 2-4 2-4
1111011w mod111r/m
Ô " ,1 1 8 ,1 1,Ô;, 1,1 å å !" ! ^^^ ,1 å!0 å """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" ,# " Ô#" 1,1 !Ô ^^^
+<*=< 2=*=*(> 1 ,1
1,1 1<*+>@+=<*A 6
8)=*+> >**=<)
,=>+9>)=*+>=<=>+9*1< 98+=?*=<
8)=*+> >+=?
&<<+@*+*A 1=++
* >@>*+@=*=<p
a
@@+>8)=*+>
&@<+8)=*+>&
,+>)=*+>,
*8)=*+>
+B=<+>7
* =<+>7
@>1< 1
,*+=<+=< =< ,1
Bibliograpy http://www.arl.wustl.edu/%7Elockwood/class/cs306/ books/artofasm/toc.html Intel 8086 Microprocessor Àatasheet aichard C.Àetmer, ³Essentials of 80x86 Assembly anguage´. Yu-Cheng iu, Glenn A. Gibson, ³Microcomputer Systems : The 8086/8088 Family´