The document discusses microprocessors, their architecture, instructions, operations, interfacing and the 8085 and 8086 microprocessors. It provides details on the functional blocks, registers, addressing modes, procedures, calling conventions, and stack usage of the 8086 microprocessor. It also describes various assembler directives, operators, and concepts like logical segments, procedures, and passing parameters in registers vs memory for procedures.
INTRODUCTION
We know that a microprocessor is the CPU of a computer. A microprocessor can perform some operation on a data and give the output. But to perform the operation we need an input to enter the data and an output to display the results of the operation. So we are using a keyboard and monitor as Input and output along with the processor. Microprocessors engineering involves a lot of other concepts and we also interface memory elements like ROM, EPROM to access the memory.
Types of Interfacing
There are two types of interfacing in context of the 8085 processor.
Memory Interfacing.
I/O Interfacing.
Memory Interfacing:
While executing an instruction, there is a necessity for the microprocessor to access memory frequently for reading various instruction codes and data stored in the memory. The interfacing circuit aids in accessing the memory.
Memory requires some signals to read from and write to registers. Similarly the microprocessor transmits some signals for reading or writing a data.
But what is the purpose of interfacing circuit here?
The interfacing process involves matching the memory requirements with the microprocessor signals. The interfacing circuit therefore should be designed in such a way that it matches the memory signal requirements with the signals of the microprocessor. For example for carrying out a READ process, the microprocessor should initiate a read signal which the memory requires to read a data. In simple words, the primary function of a memory interfacing circuit is to aid the microprocessor in reading and writing a data to the given register of a memory chip.
The interfacing process involves matching the memory requirements with the microprocessor signals. The interfacing circuit therefore should be designed in such a way that it matches the memory signal requirements with the signals of the microprocessor. For example for carrying out a READ process, the microprocessor should initiate a read signal which the memory requires to read a data. In simple words, the primary function of a memory interfacing circuit is to aid the microprocessor in reading and writing a data to the given register of a memory chip.
I/O Interfacing:
We know that keyboard and Displays are used as communication channel with outside world. So it is necessary that we interface keyboard and displays with the microprocessor. This is called I/O interfacing. In this type of interfacing we use latches and buffers for interfacing the keyboards and displays with the microprocessor.
But the main disadvantage with this interfacing is that the microprocessor can perform only one function. It functions as an input device if it is connected to buffer and as an output device if it is connected to latch. Thus the capability is very limited in this type of interfacing.
This PPT covers some important points of 8051 microcontroller like Applications, block diagram, Architecture, comparison between microprocessor and microcontroller, Pin diagram, RAM memory space allocation, register banks, Instruction set, Addresing modes, serial communication, baud rate, machine cycle, serial interface with PC, Introduction to Timers/Counters etc....
INTRODUCTION
We know that a microprocessor is the CPU of a computer. A microprocessor can perform some operation on a data and give the output. But to perform the operation we need an input to enter the data and an output to display the results of the operation. So we are using a keyboard and monitor as Input and output along with the processor. Microprocessors engineering involves a lot of other concepts and we also interface memory elements like ROM, EPROM to access the memory.
Types of Interfacing
There are two types of interfacing in context of the 8085 processor.
Memory Interfacing.
I/O Interfacing.
Memory Interfacing:
While executing an instruction, there is a necessity for the microprocessor to access memory frequently for reading various instruction codes and data stored in the memory. The interfacing circuit aids in accessing the memory.
Memory requires some signals to read from and write to registers. Similarly the microprocessor transmits some signals for reading or writing a data.
But what is the purpose of interfacing circuit here?
The interfacing process involves matching the memory requirements with the microprocessor signals. The interfacing circuit therefore should be designed in such a way that it matches the memory signal requirements with the signals of the microprocessor. For example for carrying out a READ process, the microprocessor should initiate a read signal which the memory requires to read a data. In simple words, the primary function of a memory interfacing circuit is to aid the microprocessor in reading and writing a data to the given register of a memory chip.
The interfacing process involves matching the memory requirements with the microprocessor signals. The interfacing circuit therefore should be designed in such a way that it matches the memory signal requirements with the signals of the microprocessor. For example for carrying out a READ process, the microprocessor should initiate a read signal which the memory requires to read a data. In simple words, the primary function of a memory interfacing circuit is to aid the microprocessor in reading and writing a data to the given register of a memory chip.
I/O Interfacing:
We know that keyboard and Displays are used as communication channel with outside world. So it is necessary that we interface keyboard and displays with the microprocessor. This is called I/O interfacing. In this type of interfacing we use latches and buffers for interfacing the keyboards and displays with the microprocessor.
But the main disadvantage with this interfacing is that the microprocessor can perform only one function. It functions as an input device if it is connected to buffer and as an output device if it is connected to latch. Thus the capability is very limited in this type of interfacing.
This PPT covers some important points of 8051 microcontroller like Applications, block diagram, Architecture, comparison between microprocessor and microcontroller, Pin diagram, RAM memory space allocation, register banks, Instruction set, Addresing modes, serial communication, baud rate, machine cycle, serial interface with PC, Introduction to Timers/Counters etc....
Register Organization of 8086, Architecture, Signal Description of 8086, Physical Memory
Organization, General Bus Operation, I/O Addressing Capability, Special Processor Activities,
Minimum Mode 8086 System and Timings, Maximum Mode 8086 System and Timings.
Addressing Modes of 8086.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSEDuvanRamosGarzon1
AIRCRAFT GENERAL
The Single Aisle is the most advanced family aircraft in service today, with fly-by-wire flight controls.
The A318, A319, A320 and A321 are twin-engine subsonic medium range aircraft.
The family offers a choice of engines
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
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.
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
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
About
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Technical Specifications
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
Key Features
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface
• Compatible with MAFI CCR system
• Copatiable with IDM8000 CCR
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
Application
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Democratizing Fuzzing at Scale by Abhishek Aryaabh.arya
Presented at NUS: Fuzzing and Software Security Summer School 2024
This keynote talks about the democratization of fuzzing at scale, highlighting the collaboration between open source communities, academia, and industry to advance the field of fuzzing. It delves into the history of fuzzing, the development of scalable fuzzing platforms, and the empowerment of community-driven research. The talk will further discuss recent advancements leveraging AI/ML and offer insights into the future evolution of the fuzzing landscape.
Forklift Classes Overview by Intella PartsIntella Parts
Discover the different forklift classes and their specific applications. Learn how to choose the right forklift for your needs to ensure safety, efficiency, and compliance in your operations.
For more technical information, visit our website https://intellaparts.com
1. MICROPROCESSOR
• Microprocessor is a semiconductor device consisting of electronic logic
circuits manufactured by using LSI or VLSI technique.
• Microprocessor is a programmable logic devices with registers, flip-
flops & timing elements.
– ALU
• Arithmetic operations
• Logical operations
– Register unit
– Control unit
Computer Languages
- Machine language
- Assembly language (Mnemonics, Assemblers)
- High-level language (Compilers, interpreters)
2. Architecture of Microprocessor
• The process of data manipulation and communication is determined
by the logic design of the microprocessor called the architecture.
• Function performed by the microprocessor
– Microprocessor- Initiated operations
• I/O Read, I/O Write, MR, MW
– Internal Data operations and registers
• Perform A & L operations
• Registers
• Flags
• PC, SP
– Peripherals/Externally Initiated operations
• Reset, Interrupt, Read, Hold
3. Instructions
– An instruction is a command to the microprocessor to perform a
given task on specified data.
– Types
• 1-byte instructions (MOV C,A CMA (complement)
• 2-byte instructions ( MVI A, data)
• 3-byte instructions (JMP 2010)
Operations
• Data transfer operations
• Arithmetic operations
• Logic operations
• Branch operations
Interfacing
Interfacing devices are semiconductor chips that are needed to
connect peripherals to the bus system.
Ex: Tri-state devices, Decoders, Encoders
4. 8085 Microprocessor
Intel’s 8085 is an 8bit general purpose microprocessor capable of addressing
64k of memory
8085 pin out diagram
Signal classification
1. Address bus
2. Data/address bus
3. Control & Status signal
4. Power & Frequency signals
5. Interrupts & peripheral initiated signals
6. Serial I/O ports.
Functional Block Diagram of 8085
1. ALU
Flags :
S - Sign flag (if D7=1 –ive no. If D7=0 +ive no.)
Z – Zero flag (if result is 0 then Z is set)
AC – Auxiliary Carry flag (if D3 passed carry to D4 then AC is set)
P – Parity flag (after A & L if result has even no. of 1s then P is set)
CY – Carry flag ( A & L operations results in a carry the CY is set )
5. 2. Timing & Control Unit
This unit synchronizes all the microprocessor operations with clock and
generates the control signals necessary for communication between
microprocessor and IO devices.
3. Instruction Register (IR) & Decoder
IR - When instruction is fetched from memory, it is loaded in the instruction
register.
Decoder – decodes the instruction and establishes the sequence of events
to follow.
4. Register Array
A - accumulator
B,C,D,E, H,L
W,Z – temporary registers (not accessible for user)
6. 8086 Microprocessor
• Limitations of 8085
• Intel’s 8086 was the first 16-bit microprocessor launched in 1978.
Architecture of 8086:
8086 is divided into two units – Bus Interface Unit (BIU), Execution Unit (EU)
Execution Unit:
1. Control circuit – which directs internal operations.
2. Instruction Decoder – translates instructions fetched from memory into a
series of actions which the EU carries out.
3. ALU – Add, sub, increment, decrement, complement, shift binary numbers.
4. General Data Registers
AX = (AH+AL) Accumulator
BX - used as an offset storage for forming physical address
CX - default counter in case of string and loop instructions
DX – implicit operand or destination register in case of a few instruction
7. 5. Flag Registers
A flag is a flip-flop that indicates some condition produced by the execution
of an instruction or controls certain operations of the EU.
A 16-bit flag register in the EU contains 9 active flags, 6 flags indicate some
condition produced by an instruction, 3 flags are control flags.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
O – Overflow Flag
D – Direction
I – Interrupt Flag
T – Trap Flag
S – Sign Flag
Z – Zero Flag
Ac – Auxiliary Carry Flag
P – Parity Flag
Cy – Carry Flag
X – Not used
X X X X O D I T S Z X Ac X P X Cy
8. 6. Pointers and Index Registers
Pointers contain offset within the particular segments.
IP – Instruction Pointer register holds the 16-bit address or
offset of the next code byte within code segment .
20 bit address = offset of IP + Segment base address
in CS.
BP – Base Pointer contains Source Index (SI) register and
Destination Index (DI) register
SP – Stack Pointer register in the Execution Unit holds the
16-bit offset from the start of the segment to the
memory location where a word was most recently
stored on the stack (i.e top of stack).
SP,SI,DI – these 3 register are used for temporary storage
of data.
9. Bus Interface Unit:
Segment Registers
8086 has segmented memory. 1MB memory is
divided into 16 logical segments (16x64K)
CS – Code Segment register used for addressing a
memory location in the code segment of the memory
where the executable program is stored.
SS – Stack Segment register refers to stack segment of
stack data
DS – Data Segment register point to the data segment of
the memory, where the data is resided.
ES – Extra Segment register also refers to a segment
which essentially is another data segment of the
memory. (It also points to data segment).
10. Addressing Modes of 8086
The way in which an operand is specified is called its addressing
mode.
I. Data-related addressing modes
II. Branch addressing modes
I. Data-related addressing modes
1. Immediate addressing mode
The datum is either 8 bits or 16 bits long and is part of the instruction.
2. Direct addressing modes
The 16 bit effective address (EA) of the datum is part of the
instruction
3. Register addressing modes
The datum is in the register that is specified by the instruction.
11. 4. Register Indirect
The effective address of the datum is in the base register BX or
an index register that is specified by the instruction.
5. Register Relative
The effective address is the sum of an 8 or 16 bit displacement
and the contents of a base register or an index register.
6. Based Indexed
the effective address is the sum of a base register and an index
register.
7. Relative Based Indexed
The effective address is the sum of an 8 or 16-bit displacement
and a based indexed address.
12. II. Branch Addressing Modes
1. Intrasegment Direct
The effective branch address is the sum of an 8- or 16-bit displacement and
the current contents of IP.
It may be used with either conditional or unconditional branching, but a
conditional branch instruction can have only an 8-bit displacement.
2. Intrasegment Indirect
The effective branch address is the contents of a register or memory location
that is accessed using any of the data-related addressing modes. This
mode is used only in Unconditional branch instructions.
3. Intersegment Direct
Replaces the contents of IP with part of the instruction and the contents of CS
with another part of the instruction.
The purpose of this mode is to provide a means of branching from one code
segment to another.
4. Intersegment Direct
Replaces the contents of IP and CS with the contents of two consecutive
words in memory that are referenced using any of the data-related addressing
modes except the immediate and register modes.
13. Assembler Directives
• An assembler is a program used to convert an assembly
language program into the equivalent machine code
modules which may further be converted to executable
codes.
• It decides the address of each label and substitutes the
values for each of the constant and variables.
It then forms the machine code for the mnemonics and
data in the assembly language program (ALP).
• The logical errors or other programming errors are not
found out by the assembler.
To know errors hints are required from the programmer.
• The hints are given to the assembler using some
predefined alphabetical strings called Assembler
Directives, which help the assembler to correctly
14. 1. SEGMENT, ENDS Directives
The SEGMENT and ENDS directives are used to identify a
group of data items or a group of instructions that we want
to be put together in a particular segment.
A group of data statements or a group of instruction
statements contained between SEGMENT and ENDS
directives is called a logical segment.
ex: DATA_HERE SEGMENT
------ logical
------ segment
DATA_HERE ENDS
2. DB – Define Byte
DB Directive is used to reserve byte / bytes of memory
locations in the available memory.
3. DW – Define Word
DW is used to specify that the data is of type word (16-
bits).
15. 4. DD – Define Double Word
DD is used to specify that the data is of type
double word (32-bits).
5. DQ – Define Quadword
This directive us used to direct the assembler to
reserve 4 words (8 bytes) of memory for specified
variable and may initialize it with the specified
values.
6. DT – Define Ten Bytes
The DT directive directs the assembler to reserve
10 bytes of memory for specified variable and
may initialize it with the specified values.
16. 7. ASSUME – Assume Logical Segment Name
The ASSUME directive is used to inform the assembler, the names
of the logical segments to be assumed for different segments used
in the program.
The ASSUME statement is a must at the starting of each
assembly language program.
Ex: ASSUME CS:CODE
directs the assembler that the machine codes are available in a
segment named CODE, and hence the CS register is to be loaded
with address (segment) allotted by the operating system for the
label CODE, while loading.
8. END – END of Program
The END directive marks the end of an ALP.
In ALP, the subroutines are called procedures.
• ENDP – END of Procedure
The ENDP directive is used to indicate the end of a procedure.
Ex: PROCEDURE STAR
----
----
STAR ENDP
17. 10. EVEN – Align on Even Memory Address
The EVEN directive updates the location counter to the next even
address.
Ex: EVEN
PROCEDURE ROOT
-----
----
ROOT ENDP
11. EQU – Equate
The directive EQU is used to assign a label with a value or a
symbol.
While assembling, whenever the assembler comes across the label ,
it substitutes the numerical value for that label and finds out the
equivalent code.
12. LABEL – Label
The Label directive is used to assign a name to current content of
the location counter.
18. 13. EXTRN – External and PUBLIC : Public
The directive EXTRN informs the assembler that the names,
procedures and labels declared after this directive have already
been defined in some other assembly language modules.
While in the other module, where the names, procedures and
labels actually appear, they must be declared public, using the
PUBLIC directive.
Ex: MODULE1 SEGMENT
PUBLIC FACTORIAL FAR
MODULE1 ENDS
MODULE2 SEGMENT
EXTRN FACTORIAL FAR
MODULE2 ENDS
14. GROUP – Group the Related Segments
This directive is used to form logical groups of segments with
similar purpose or type.
The assembler passes an information to the linker/loader to form
the code such that the group declared segments or operands
must lie within a 64KB memory segment.
Ex: PROGRAM GROUP CODE, DATA, STACK
ASSUME CS:PROGRAM, DS:PROGRAM, SS:PROGRAM
19. 15. LOCAL
The lables, variables, constants or procedures declared LOCAL in a
module are to be used only by that particular module.
Ex: LOCAL a,b,DATA, ARRAY
16. OFFSET – Offset of a Label
When the assembler comes across the OFFSET operator along with
a label, it first computes the 16-bit displacement of the particular
label, and replaces the string ‘OFFSET LABEL’ by the computed
displacement.
This operator is used with arrays, strings, labels and procedures to
decide their offsets in their default segments.
17. ORG – Origin
The ORG directive directs the assembler to start the memory
allotment for the particular segment, block or code from the
declared address in the ORG statement.
While starting the assembly process for a module, the assembler
initializes a location counter to keep track of the allotted addresses
for the module.
If an ORG statement is not written in the program, the location
counter is initialized to 0000.
20. 18. PROC – Procedure
The PROC directive marks the start of a named
procedure in the statement.
Also, the types NEAR or FAR specify the type of
the procedure, i.e whether it is to be called by the
main program located within 64k of physical
memory or not.
19. FAR PTR
This directive indicates the assembler that the label
following FAR PTR is not available within the same
segment and the address of the label is of 32-bits i.e 2
bytes offset followed by 2 bytes segment address.
20. NEAR PTR
This directive indicates the assembler that the label
following NEAR PTR is in the same segment and
needs only 16-bit i.e 2 byte offset to address it.
21. Assembler Operators
Another type of hint which helps the assembler to assign a
particular constant with a label or initialize particular memory
locations or labels with constants is an operator.
1. PTR – Pointer
The PTR operator is used to declare the type of a label, variable
or memory operand. The operator PTR is prefixed by either
BYTE or WORD.
2. SEG – Segment of a Label
The SEG operator is used to decide the segment address of the
label, variable, or procedure and substitutes the segment base
address in place of “SEG” label.
3. SHORT
The SHORT operator indicates to the assembler that only one
byte is required to code the displacement for a jump i.e
displacement is within -128 to +127 bytes from the address of
the byte next to the jump opcode.
This method of specifying the jump address saves the memory.
22. 4. TYPE
The TYPE operator directs the assembler to decide the data type
of the specified label and replaces the ‘TYPE’ label by the
decided data type.
Ex: MOV AX, TYPE STRING
moves the value 0002h in AX.
5. GLOBAL
The labels, variables, constants or procedures declared GLOBAL
may be used by other modules of the program.
Ex: ROUTINE PROC GLOBAL
6. ‘ + & - ‘ Operators
These operators represent arithmetic addition and subtraction
respectively and are typically used to add or subtract
displacement (8 or 16 bit) to base or index registers or stack or
base pointers.
Ex: MOV AL, [SI +2]
23. 8086 Stack
• The Stack is a section of memory we set aside for storing
return address. And used to save the contents of registers for
the calling program while a procedure executes. It also used
to hold data or addresses that will be acted upon by a
procedure.
• 8086 contains stack segment (SS) register and stack pointer
(SP) register.
• SS reg. is used to hold the upper 16 bits of the starting
address we give to the stack segment. SP reg. is used to hold
the offset of the last word written on the stack.
• 8086 produces the physical address for a stack location by
adding the offset contained in the SP reg. to the stack
segment base address represented by the 16-bit number in
the SS reg.
• SP reg. is automatically decremented by 2 before a word is
written to the stack i.e. initialize the SP reg to point to the
top of the memory you set aside as a stack.
24. • If the CALL is to a procedure in the same code
segment then the CALL is NEAR, and the
Instruction Pointer (IP) contents will be saved on
the stack.
• A RET at the end of the procedure copies IP value
from the stack back to the IP to return execution to
the calling program.
• If the CALL is to a procedure in another code
segment, the CALL is FAR, and both the IP & CS
register contents will be saved on the stack.
• A RET instruction at the end of the procedure
copies these values from the stack back into the IP
& CS registers to return execution to the mainline
program.
25. Procedures
• Procedure is a group of instructions used at several
different points in a program.
Procedure name PROC arguments
----
----
RET
ENDP
• CALL instruction is used to call a particular
procedure
• RET instruction at the end of the procedure
returns execution to the next instruction
• CALL instruction executes, it automatically stores
the return address in the stack memory.
26. Passing parameters to procedure
1. Passing parameters in Registers
DATA SEGMENT
BCD_INPUT DB 20H
BIN_VALUE DB ?
DATA ENDS
CODE SEGMENT
---
MOV AL, BCD_INPUT ;Moving input into AL reg.
CALL BCD_BIN ; call procedure BCD_BIN
---
NOP
;Procedure to convert BCD to Binary no.
BCD_BIN PROC NEAR
----
---
RET
BCD_BIN ENDP
---
CODE ENDS
END
27. 2. Passing parameters in General Memory
DATA SEGMENT
BCD_INPUT DB 20H
BIN_VALUE DB ?
DATA ENDS
CODE SEGMENT
---
CALL BCD_BIN ; call procedure BCD_BIN
---
NOP
;Procedure to convert BCD to Binary no.
BCD_BIN PROC NEAR
----
MOV AL, BCD_INPUT ;Load input from memory
------
MOV [DI], AL ; Store result in memory
RET
BCD_BIN ENDP
----
CODE ENDS
28. 3. Passing Parameters using Pointers
DATA SEGMENT
BCD_INPUT DB 20H
BIN_VALUE DB ?
DATA ENDS
CODE SEGMENT
---
MOV SI, OFFSET BCD_INPUT ;create pointer to BCD
input
MOV DI, OFFSET BIN_VALUE ; Store result
CALL BCD_BIN ; call procedure BCD_BIN
---
NOP
29. ;Procedure to convert BCD to Binary no.
BCD_BIN PROC NEAR
----
MOV AL, [SI] ;Load input from memory
------
MOV [DI], AL ; Store result in memory
----
RET
BCD_BIN ENDP
----
CODE ENDS
END
30. MACROS
• A macro is group if instructions we bracket and give a
name to at the start of our program. Each time we “call”
the macro in our program, the assembler will insert the
defined group of instructions in place of the “call”.
• Every time a macro name in the program, replace it
with the group of instructions defined as that macro at
the start of the program. This process is known as
expanding the macro or macro expansion.
• Using a macro avoids the overhead time involved in
calling, returning from a procedure.
• A disadvantage of generating in-line code each time a
macro is called is that this will make the program take
up more memory than using a procedure.
31. Defining a MACRO:
Macro_name MACRO dummy parameters
------
-----
ENDM
Ex:
Move_ASCII MACRO Number,Source,Destination
Mov CX,Number ; No. of characters to be moved in CX
LEA SI,Source ; Point SI at ASCII source
LEA DI,Destination ; Point DI at ASCII destination
CLD ; Autoincrement pointer after move
REP MOVSB ; Copy ASCII string to new location
ENDM
A macro may be defined in another macro or
a macro may be called from inside a macro. This type of
macro is called a nested macro.