Introduction of memory Segmentation
Segmentation is the process in which the main memory of the computer is logically divided into different segments and each segment has its own base address.
Memory segmentation is the methods where whole memory is divided into the smaller parts called segments of various sizes.
A segment is just an area in memory.
The process of dividing memory this way is called segmentation.
Introduction of memory Segmentation
Segmentation is the process in which the main memory of the computer is logically divided into different segments and each segment has its own base address.
Memory segmentation is the methods where whole memory is divided into the smaller parts called segments of various sizes.
A segment is just an area in memory.
The process of dividing memory this way is called segmentation.
instruction set of 8086 microprocessor has following categories:
-Data transfer instructions
-Arithmetic instructions
-Logical instructions
-Flag manipulation instructions
-shift and rotate instructions
-String instructions
-8086 assembler directives
This presentation discusses the support for interrupts in 8051. The interrupt types, interrupts versus polling etc are discussed. The register formats of IE, IP register are discussed. The concept of priority among the interrupts is discussed.
instruction set of 8086 microprocessor has following categories:
-Data transfer instructions
-Arithmetic instructions
-Logical instructions
-Flag manipulation instructions
-shift and rotate instructions
-String instructions
-8086 assembler directives
This presentation discusses the support for interrupts in 8051. The interrupt types, interrupts versus polling etc are discussed. The register formats of IE, IP register are discussed. The concept of priority among the interrupts is discussed.
Mastering Assembly Language: Programming with 8086sravanithonta79
Unlock the secrets of 8086 assembly language programming with this comprehensive document. Delve into the intricacies of low-level coding, understand the architecture, and harness the full potential of the 8086 processor. From foundational concepts to advanced techniques, this guide empowers you to craft efficient and powerful programs for the 8086 platform.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGFrankie Jones
3.1 UNDERSTANDING INSTRUCTION SET AND ASSEMBLY LANGUAGE
3.1.1 Define instruction set,machine and assembly language
3.1.2 Describe features and architectures of various type of microprocessor
3.1.3 Describe the Addressing Modes
3.2 APPLY ASSEMBLY LANGUAGE
3.2.1 Write simple program in assembly language
3.2.2 Tool in analyzing and debugging assembly language program
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Courier management system project report.pdfKamal Acharya
It is now-a-days very important for the people to send or receive articles like imported furniture, electronic items, gifts, business goods and the like. People depend vastly on different transport systems which mostly use the manual way of receiving and delivering the articles. There is no way to track the articles till they are received and there is no way to let the customer know what happened in transit, once he booked some articles. In such a situation, we need a system which completely computerizes the cargo activities including time to time tracking of the articles sent. This need is fulfilled by Courier Management System software which is online software for the cargo management people that enables them to receive the goods from a source and send them to a required destination and track their status from time to time.
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Vaccine management system project report documentation..pdfKamal Acharya
The Division of Vaccine and Immunization is facing increasing difficulty monitoring vaccines and other commodities distribution once they have been distributed from the national stores. With the introduction of new vaccines, more challenges have been anticipated with this additions posing serious threat to the already over strained vaccine supply chain system in Kenya.
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
3. DEFINITION
• An instruction is a binary pattern designed
inside a microprocessor to perform a specific
function.
• The entire group of instructions that a
microprocessor supports is called Instruction
Set.
• The entire group of instructions that a
microprocessor supports is called Instruction
Set.
4. INSTRUCTION FORMAT
• The instruction format of 8086 has one or
more number of fields associated with it.
• The first field is called operation code field or
opcode field, which indicates the type of
operation.
• The instruction format also contains other
fields known as operand fields.
5. • The Opcode or the operation code tells the
microprocessor which operation to perform
e.g. addition, subtraction.
• Operands are the data contents on which
the operation is to be performed.
Eg: ADD AX, BX
ADD: Opcode
AX, BX : Operands(Data contents)
6. TYPES OF INSTRUCTION SETS
The 8086 instructions are categorized into the following
main types.
i. Data transfer Instructions
ii. Arithmetic Instructions
iii. Bit Manipulation Instructions (Logical instruction)
iv. Branch Instructions
v. Loop Instructions
vi. Machine Control Instructions
vii. Flag Manipulation Instructions
viii. Shift and Rotate Instructions
ix. String Instructions
7. Data transfer Instructions
• These instructions are used to transfer the
data from the source operand to the
destination operand.
• The operand can be a constant, memory
location, register or I/O port address.
i. Instruction to transfer a word (7)
ii. Instructions for input and output port transfer (2)
iii. Instructions to transfer the address (3)
iv. Instructions to transfer flag registers (4)
8. Data transfer Instructions
Instruction to transfer a word (7)
1. MOV − Used to copy the byte or word from the
provided source to the provided destination.
2. PUSH − Used to put a word at the top of the stack.
3. POP − Used to get a word from the top of the stack to
the provided location.
4. XCHG − Used to exchange the data from two
locations.
5. XLAT − Used to translate a byte in AL using a table in
the memory.
6. PUSHA − Used to put all the registers into the stack.
7. POPA − Used to get words from the stack to all
registers.
9. Data transfer Instructions
1. Syntax: MOV Destination, Source:
• Source operand can be register, memory location
or immediate operand.
• Destination can be register or memory operand.
• Both Source and Destination cannot be memory
location at the same time.
• Example:
MOV CX, 037A H; The data 037A H is moved to CX Register
MOV AL, BL; The data in BL register is moved to AL Register
MOV BX, [0301 H]; The data in the memory location [0301 H]
is moved to BX Register
10. Data transfer Instructions
2. Syntax: PUSH Operand
• It pushes the operand into top of stack.
• The stack pointer is decremented by 2, after each
execution of the instruction.
E.g.: PUSH BX; The content of BX register is moved to the stack register
3. Syntax: POP Destination
• It pops the operand from top of stack to
Destination.
• Destination can be a general purpose register,
segment register(except CS) or memory location.
• The stack pointer is incremented by 2
E.g.: POP AX; The content of stack register is moved to AX register
11. Data transfer Instructions
4. Syntax: XCHG Destination, Source:
• This instruction exchange the contents of the
specified source and destination operands
• It cannot exchange two memory locations
directly.
E.g.
XCHG DX, AX; The content in AX and DX register is exchanged.
If AX contains 0234 H and DX contains 45AD H after execution AX contains 45AD H
and DX contains 0234 H
XCHG [5000H], AX;
12. Data transfer Instructions
5. Syntax: XLAT
• Translate byte using look-up table
• Locates a byte entry in a table in memory, using
the contents of the AL register as a table index,
then copies the contents of the table entry back
into the AL register. The index in the AL register is
treated as an unsigned integer.
• The XLAT and XLATB instructions get the base
address of the table in memory from either the
DS:EBX or the DS:BX registers
Eg. LEA BX, TABLE1; first load the offset part of the start address of
the table into BX register
MOV AL, 04H; load AL with the position of the byte in the table
XLAT; invoke the XLAT instruction
13. Data transfer Instructions
6. Syntax: PUSHA
• Push all general purpose registers AX, CX, DX,
BX, SP, BP, SI, DI in the stack.
• Original value of SP register (before PUSHA) is
used.
7. Syntax: POPA
• Pop all general purpose registers DI, SI, BP, SP,
BX, DX, CX, AX from the stack.
• SP value is ignored, it is Popped but not set to
SP register.
• No flags affected.
14. Data transfer Instructions
Instructions for input and output port transfer (2)
1. IN − Used to read a byte or word from the provided
port to the accumulator.
2. OUT − Used to send out a byte or word from the
accumulator to the provided port.
Syntax: IN Accumulator, Port Address:
It transfers the operand from specified port to
accumulator register.
E.g.: IN AX, 0028 H
Syntax: OUT Port Address, Accumulator:
It transfers the operand from accumulator to
specified port.
E.g.: OUT 0028 H, AX
15. Data transfer Instructions
Instructions to transfer the address (3)
1. LEA − Used to load the address of operand
into the provided register.
2. LDS − Used to load DS register and other
provided register from the memory
3. LES − Used to load ES register and other
provided register from the memory.
16. Data transfer Instructions
1. Syntax: LEA Register, Source
• Load effective address
• It loads a 16-bit register with the offset
address of the data specified by the Source.
E.g.: MOV BX, 35h
MOV DI, 12h
LEA SI, [BX+DI] ; SI = 35h + 12h = 47h
17. Data transfer Instructions
2. Syntax: LDS Destination, Source:
• It loads 32-bit pointer from memory source to
destination register and DS.
• The offset is placed in the destination register
and the segment is placed in DS.
• To use this instruction the word at the lower
memory address must contain the offset and the
word at the higher address must contain the
segment.
E.g.: LDS BX, [0301 H]
18. Data transfer Instructions
3. Syntax: LES Destination, Source:
• It loads 32-bit pointer from memory source to
destination register and ES.
• The offset is placed in the destination register
and the segment is placed in ES.
• This instruction is very similar to LDS except
that it initializes ES instead of DS.
E.g.: LES BX, [0301 H]
19. Data transfer Instructions
Instructions to transfer flag registers (4)
1. LAHF − Used to load AH with the low byte of
the flag register.
2. SAHF − Used to store AH register to low byte
of the flag register.
3. PUSHF − Used to copy the flag register at the
top of the stack.
4. POPF − Used to copy a word at the top of the
stack to the flag register.
20. Arithmetic Instructions
• These instructions are used to perform
arithmetic operations like addition,
subtraction, multiplication, division, etc.
1. Syntax: ADD Destination, Source
• It adds a byte to byte or a word to word.
• It affects AF, CF, OF, PF, SF, ZF flags.
E.g.:
ADD AL, 74H
ADD DX, AX
ADD AX, [BX]
21. Arithmetic Instructions
2. Syntax: ADC Destination, Source
• It adds the two operands with CF.
• It affects AF, CF, OF, PF, SF, ZF flags.
E.g.:
ADC AL, 74H;
ADC DX, AX;
ADC AX, [BX];
22. Arithmetic Instructions
3. Syntax: SUB Destination, Source:
• It subtracts a byte from byte or a word from
word.
• It affects AF, CF, OF, PF, SF, ZF flags.
• For subtraction, CF acts as borrow flag.
E.g.:
SUB AL, 74H;
SUB DX, AX;
SUB AX, [BX];
23. Arithmetic Instructions
4. Syntax: SBB Destination, Source:
• It subtracts the two operands and also the
borrow from the result.
• It affects AF, CF, OF, PF, SF, ZF flags.
E.g.:
SBB AL, 74H;
SBB DX, AX;
SBB AX, [BX];
24. Arithmetic Instructions
5. Syntax: INC Source:
• It increments the byte or word by one.
• The operand can be a register or memory
location.
• It affects AF, OF, PF, SF, ZF flags.
• CF is not effected.
E.g.: INC AX;
25. Arithmetic Instructions
6. Syntax: DEC Source:
• It decrements the byte or word by one.
• The operand can be a register or memory
location.
• It affects AF, OF, PF, SF, ZF flags.
• CF is not effected.
E.g.: DEC AX;
26. Arithmetic Instructions
7. AAA (ASCII Adjust after Addition):
• The data entered from the terminal is in ASCII
format.
• In ASCII, 0 – 9 are represented by 30H – 39H.
• This instruction allows us to add the ASCII codes.
• This instruction does not have any operand.
Other ASCII Instructions:
• AAS (ASCII Adjust after Subtraction)
• AAM (ASCII Adjust after Multiplication)
• AAD (ASCII Adjust Before Division)
27. Arithmetic Instructions
8. DAA (Decimal Adjust after Addition)
• It is used to make sure that the result of adding
two BCD numbers is adjusted to be a correct BCD
number.
• It only works on AL register.
DAS (Decimal Adjust after Subtraction)
• It is used to make sure that the result of
subtracting two BCD numbers is adjusted to be a
correct BCD number.
• It only works on AL register.
28. Arithmetic Instructions
9. Syntax: NEG Source:
• It creates 2’s complement of a given number.
• It changes the sign of a number.
• Invert all bits of the operand
• Add 1 to inverted operand
Example:
MOV AL, 5 ; AL = 05h
NEG AL ; AL = 0FBh (-5)
NEG AL ; AL = 05h (5)
29. Arithmetic Instructions
10. Syntax: CMP Destination, Source:
• It compares two specified bytes or words.
• The Source and Destination can be a constant, register or
memory location.
• Both operands cannot be a memory location at the same
time.
• The comparison is done simply by internally subtracting the
source from destination.
• The value of source and destination does not change, but
the flags are modified to indicate the result.
Example:
MOV AL, 5H;
MOV BL, 5H;
CMP AL, BL ; AL = 5, ZF = 1 (so equal!)
RET
30. Arithmetic Instructions
11. Syntax: MUL Source:
• It is an unsigned multiplication instruction.
• It multiplies two bytes to produce a word or two words to
produce a double word.
• when operand is a byte
AX = AL * operand.
• when operand is a word:
(DX : AX) = AX * operand.
• This instruction assumes one of the operand in AL or AX.
• Source can be a register or memory location.
Example:
MOV AL, 200 ; AL = 0C8h
MOV BL, 4
MUL BL ; AX = 0320h (800)
RET
31. Arithmetic Instructions
12. Syntax: IMUL Source:
• It is a signed multiplication instruction.
• Source can be a register or memory location.
Example:
MOV AL, -2
MOV BL, -4
IMUL BL ; AX = 8
RET
32. Arithmetic Instructions
13. Syntax: DIV Source:
• It is an unsigned division instruction.
• It divides word by byte or double word by word.
• when operand is a byte:
AL = AX / operand
AH = remainder (modulus)
• when operand is a word:
AX = (DX AX) / operand
DX = remainder (modulus)
Example:
MOV AX, 203 ; AX = 00CBh
MOV BL, 4;
DIV BL ; AL = 50 (32h), AH = 3
RET
33. Arithmetic Instructions
14. Syntax: IDIV Source:
• It is a signed division instruction.
• Source can be register or memory.
Example:
MOV AX, -203 ; AX = 0FF35h
MOV BL, 4
IDIV BL ; AL = -50 (0CEh), AH = -3 (0FDh)
RET
34. Arithmetic Instructions
15. CBW (Convert Byte to Word):
• This instruction converts byte in AL to word in AX.
• The conversion is done by extending the sign bit of AL throughout
AH.
• if high bit of AL = 1 then:
AH = 255 (0FFh)
else
AH = 0
Example:
MOV AX, 0 ; AH = 0, AL = 0
MOV AL, -5 ; AX = 000FBh (251)
CBW ; AX = 0FFFBh (-5)
RET
16. CWD (Convert Word to Double Word):
• This instruction converts word in AX to double word in DX : AX.
• The conversion is done by extending the sign bit of AX throughout
DX.
35. Bit Manipulation Instructions
Bit Manipulation (Logical) Instructions
• These instructions are used to perform
operations where data bits are involved, i.e.
operations like logical, shift, etc.
• Instructions to perform logical operation (5)
• Instructions to perform shift operations (4)
• Instructions to perform rotate operations (4)
36. Bit Manipulation Instructions
Instructions to perform logical operation (5)
1. NOT − Used to invert each bit of a byte or word.
2. AND − Used for adding each bit in a byte/word
with the corresponding bit in another byte/word.
3. OR − Used to multiply each bit in a byte/word
with the corresponding bit in another byte/word.
4. XOR − Used to perform Exclusive-OR operation
over each bit in a byte/word with the
corresponding bit in another byte/word.
5. TEST − Used to add operands to update flags,
without affecting operands.
37. Bit Manipulation Instructions
1. Syntax: NOT Source:
• It complements each bit of Source to produce 1’s
complement of the specified operand.
• The operand can be a register or memory
location.
• It does not affect the status flags.
Example:
MOV AL, 00011011b
NOT AL ; AL = 11100100b
RET
38. Bit Manipulation Instructions
2. Syntax: AND Destination, Source:
• It performs AND operation of Destination and Source.
• Source can be immediate number, register or memory
location.
• Destination can be register or memory location.
• Both operands cannot be memory locations at the
same time.
• CF and OF become zero after the operation.
• PF, SF and ZF are updated.
Example:
MOV AL, 'a' ; AL = 01100001b
AND AL, 11011111b ; AL = 01000001b ('A')
RET
39. Bit Manipulation Instructions
3. Syntax: OR Destination, Source:
• It performs OR operation of Destination and Source.
• Source can be immediate number, register or memory
location.
• Destination can be register or memory location.
• Both operands cannot be memory locations at the
same time.
• CF and OF become zero after the operation.
• PF, SF and ZF are updated.
Example:
MOV AL, 'A' ; AL = 01000001b
OR AL, 00100000b ; AL = 01100001b ('a')
RET
40. Bit Manipulation Instructions
4. Syntax: XOR Destination, Source
• It performs XOR operation of Destination and Source.
• Source can be immediate number, register or memory
location.
• Destination can be register or memory location.
• Both operands cannot be memory locations at the same
time.
• CF and OF become zero after the operation.
• PF, SF and ZF are updated.
Example:
MOV AL, 00000111b
XOR AL, 00000010b ; AL = 00000101b
RET
41. Bit Manipulation Instructions
Instructions to perform shift operations (4)
• SHL/SAL − Used to shift bits of a byte/word
towards left and put zero(S) in LSBs.
• SHR − Used to shift bits of a byte/word towards
the right and put zero(S) in MSBs.
• SAR − Used to shift bits of a byte/word towards
the right and copy the old MSB into the new
MSB.
42. Bit Manipulation Instructions
1. Syntax: SAL/SHL Destination, Count:
• It shift bits of byte or word left, by count.
• It puts zero(s) in LSBs. MSB is shifted into carry
flag.
• If the number of count desired to be shifted is
1, then the immediate number 1 can be
written in Count.
• However, if the number of count to be shifted
is more than 1, then the count is put in CL
register.
43. Bit Manipulation Instructions
2. Syntax: SHR Destination, Count:
• It shift bits of byte or word right, by count.
• It puts zero(s) in MSBs.
• LSB is shifted into carry flag.
• If the number of bits desired to be shifted is 1,
then the immediate number 1 can be written in
Count.
• However, if the number of bits to be shifted is
more than 1, then the count is put in CL register.
44. Bit Manipulation Instructions
3. Syntax: SAR destination, count
• As a bit is shifted out of the MSB position, a copy
of the old MSB is put in the MSB position.
• The LSB will be shifted into CF.
• In the case of multiple shifts, CF will contain the
bit most recently shifted in from the LSB.
• Bits shifted into CF previously will be lost.
45. Bit Manipulation Instructions
Instructions to perform Rotate operations (4)
1. ROL − Used to rotate bits of byte/word towards
the left, i.e. MSB to LSB and to Carry Flag [CF].
2. ROR − Used to rotate bits of byte/word towards
the right, i.e. LSB to MSB and to Carry Flag [CF].
3. RCR − Used to rotate bits of byte/word towards
the right, i.e. LSB to CF and CF to MSB.
4. RCL − Used to rotate bits of byte/word towards
the left, i.e. MSB to CF and CF to LSB.
46. Bit Manipulation Instructions
• Syntax: ROL/ RCL Destination, Count:
• It rotates bits of byte or word left, by count.
• MSB is transferred to LSB and also to CF.
• If the number of bits desired to be shifted is 1,
then the immediate number 1 can be written
in Count.
• However, if the number of bits to be shifted
47. Bit Manipulation Instructions
Syntax: ROR/ RCR Destination, Count:
• It rotates bits of byte or word right, by count.
• LSB is transferred to MSB and also to CF.
• If the number of bits desired to be shifted is 1,
then the immediate number 1 can be written
in Count.
• However, if the number of bits to be shifted is
more than 1, then the count is put in CL
register.
48.
49. Program Execution Transfer
Instructions
• These instructions cause change in the
sequence of the execution of instruction.
• This change can be through a condition or
sometimes unconditional.
• The conditions are represented by flags.
50. Program Execution Transfer
Instructions
CALL Des:
• This instruction is used to call a subroutine or
function or procedure.
• The address of next instruction after CALL is
saved onto stack.
RET:
• It returns the control from procedure to calling
program.
• Every CALL instruction should have a RET.
51. JMP Des:
• This instruction is used for unconditional jump
from one place to another.
Jxx Des (Conditional Jump):
• All the conditional jumps follow some
conditional
• Statements or any instruction that affects the
flag.
53. Program Execution Transfer
Instructions
• Syntax: Loop Destination:
• This is a looping instruction.
• The number of times looping is required is
placed in the CX register.
• With each iteration, the contents of CX are
decremented.
• ZF is checked whether to loop again or not.
54. String Instructions
• String in assembly language is just a
sequentially stored bytes or words.
• There are very strong set of string instructions
in 8086.
• By using these string instructions, the size of
the program is considerably reduced.
55. CMPS Destination, Source:
• It compares the string bytes or words.
SCAS String:
• It scans a string.
• It compares the String with byte in AL or with
word in AX.
56. MOVS / MOVSB / MOVSW:
• It causes moving of byte or word from one
string to another.
• In this instruction, the source string is in Data
Segment and destination string is in Extra
Segment.
• SI and DI store the offset values for source and
destination index.
57. REP (Repeat):
• This is an instruction prefix.
• It causes the repetition of the instruction until
CX becomes zero.
• E.g.: REP MOVSB STR1, STR2
• It copies byte by byte contents.
• REP repeats the operation MOVSB until CX
becomes zero.
58. Processor Control Instructions
• These instructions control the processor itself.
• 8086 allows to control certain control flags
that causes the processing in a certain
direction processor synchronization if more
than one microprocessor attached.
59. STC:
• It sets the carry flag to 1.
CLC:
• It clears the carry flag to 0.
CMC:
• It complements the carry flag.
STD:
• It sets the direction flag to 1.
• If it is set, string bytes are accessed from higher
memory address to lower memory address.
CLD:
• It clears the direction flag to 0.
• If it is reset, the string bytes are accessed from
lower memory address to higher memory address.