Page 388 - FUNDAMENTALS OF COMPUTER
P. 388
NPP
388 Fundamentals of Computers NPP
Instruction Microoperation
MUL T AC ← M[T] * AC
AC
DIV B AC ← MB
[]
ADD R AC ← R + AC
1 1
MUL R 2 AC ← R * AC
2
4. Zero-Address Instructions 4. eyÝ`-ES´>og {ZX}e
No operand is specified in this type of in- Bg àH$ma Ho$ {ZX}e _| H$moB© Am°na|S> Zht Xem©`m OmVm
structions. Stack-organised computers use this h¡Ÿ& ñQ>oH$-Am°J}ZmBÁS> H$åß`yQ>g© _| Bg \$m°_}Q> H$m Cn`moJ
type of instructions. The instruction format
has following form: hmoVm h¡Ÿ& {ZåZ \$m°_}Q> hmoVm h¡Ÿ:
Instruction
Opcode
The operation is performed on top two ñQ>oH$ H$s D$nar Xmo cmoHo$eZ na {H«$`m hmoVr h¡ Am¡a
locations of the stack and the result is placed in n[aUm_ g~go D$na H$s cmoHo$eZ na S>mc {X`m OmVm h¡Ÿ&
the top of the stack. Consider following in- {ZåZ {ZX}e H$mo XoImo:
struction :
ADD
It will perform addition of top two bytes Bggo ñQ>oH$ Ho$ g~go D$na Ho$ Xmo ~mB©Q> H$m Omo‹S>
of stack. The result will be pushed onto the top hmoJmŸ& n[aUm_ g~go D$na H$s cmoHo$eZ na ñQ>moa hmo OmEJmŸ&
of the stack.
5.4 Instruction Types 5.4 B§ñQ´>³eZ Q>mB©n
5.4.1 Data Transfer Instructions 5.4.1 S>mQ>m Q´>m§g\$a B§ñQ´>ŠeÝg
In data transfer instructions data is cop- S>mQ>m Q´>m§g\$a B§ñQ´>ŠeÝg ‘| S>mQ>m H$mo gmog© cmoHo$eZ
ied from source location to destination loca- go S>opñQ>ZoeZ cmoHo$eZ _| H$m°nr {H$`m J`m h¡& gmog©-H§$Q>|Q>
tion. The contents of source are not modified.
Now consider following 8086 Instruction: H$mo _m°{S>\$m` Zht {H$`m J`m h¡& A~ {ZåZ 8086 B§ñQ´>ŠeZ
H$mo \$m°cmo H$a|:
MOV r , r : Contents of register r is to be MOV r , r : a{OñQ>a r Ho$ H§$Q>|Q²>g r _| Q´>m§g\$a
2
1
2
1
2
2
1
transferred into r . H$aZm h¢&
1
(r ) (r )
2
1
r and r can be any 8-bit registers. e.g. · r Ed§ r H$moB© ^r 8 {~Q> a{OñQ>a hmo gH$Vo h¢, O¡go…
2
1
2
1
MOV AH, BH
This instruction copies contents of BH into `h B§ñQ´>ŠeZ BH Ho$ H§$Q>|Q²>g AH _| H$m°nr H$aoJm&
AH.