THE 8086 MICROPROCESSOR
1. What
is microprocessor?
A
microprocessor is a multipurpose, programmable, clock-driven , register-based
electronic device that reads binary information from a storage device called
memory, accepts binary data as input and processes data according to those
instructions, and provides result as output.
2. What
is Accumulator?
The
Accumulator is an 8-bit register that is part of the arithmetic/logic unit
(ALU). This register is used to store 8-bit data and to perform arithmetic and
logical operations. The result of an operation is stored in the accumulator.
The accumulator is also identified as register A.
3. What
is stack?
The stack
is a group of memory locations in the R/W memory that is used for temporary
storage of binary information during the execution of a program
4. What
is a subroutine program?
A
subroutine is a group of instructions written separately from the main program
to perform a function that occurs repeatedly in the main program. Thus
subroutines avoid the repetition of same set of instructions in the main
program.
5. Define
addressing mode.
Addressing
mode is used to specify the way in which the address of the operand is
specified within the instruction.
6. Define
instruction cycle.
It is
defined as the time required to complete the execution of an instruction.
7 . Write
a program to add a data byte located at offset 0500H in 2000H segment to
another data byte available at 0600H in the same segment and store the result
at 0700H in the same segment.
MOV AX,
2000H; initialize DS with value MOVDS, AX; 2000H
MOV AX,
[500H]; Get first data byte from 0500H offset ADD AX, [600H]; Add this to the
second byte from 0600H MOV [700H],AX; store AX in 0700H
HLT;
Stop.
8. What
are the different types of addressing modes of 8086 instruction set? The
different addressing modes are:
i. Immediate
ii. Direct
iii. Register
iv.Register
indirect
v. Indexed
vi.Register relative
vii.Based
indexed
viii.
Relative based indexed
9. What are
the different types of instructions in 8086 microprocessor? The different types
of instructions in 8086 microprocessor are:
i. Data copy
/ transfer instructions
ii. Arithmetic
and logical instructions
iii. Branch
instructions
iv.Loop
instruction
v. Machine
control instruction
vi.Flag
manipulation instruction
vii.Shift and
rotate instruction
viii.
String instruction
10.
What is assembly level programming?
A program
called assembler is used to convert the mnemonics of instruction and data into
their equivalent object code modules. The object code modules are further
converted into executable code using linker and loader programs. This type of
programming is called assembly level programming.
11. What
is a stack?
Stack is
a top-down data structure, whose elements are accessed using a pointer that is
implemented using the SS and SP registers. It is a LIFO data segment.
12. How
is the stack top address calculated?
The stack
top address is calculated using the contents of the SS and SP register. The
contents of stack segment (SS) register is shifted left by four bit positions
(multiplied by (0h)) and the resulted 20-bit content is added with the 16-bit
offset value of the stack pointer (SP) register.
13. What
are macros?
Macros
are small routines that are used to replace strings in the program. They can
have parameters passed to them, which enhances the functionality of the micro
itself‟
14.how
are constants declared?
Constants
are declared in the same way as variables, using the format: Const – Label EQU
012h
When the
constants label is encountered, the constant numeric value is exchanged for the
string.
15. Write
an assembly language program for a 16-bit increment and will not affect the
contents
of the accumulator.
MACRO
inc16 variable; Increment two bytes starting at “variable” Local INC16 End
INC
variable; Increment the low 8 bits
PUSH ACC
MOV A
variable; Are the incremented low 8 bits = 0? JNZ INC 16 End
INC
variable + 1
Inc16
End; Yes – increment the upper 8 bits
POP ACC
END MAC
16. What
will happen if a label within a macro is not declared local?
If a
label within a macro is not declared local, then at assembly time, there will
be two types of errors:
I. The
first will state that there are multiple labels in the source.
II. The
second will indicate that jump instructions don’t know which one to use.
17. Write an assembly language program to load the accumulator with a
constant value. MACRO invert value
if
(value==0) MOV A, #1
else
clr A end
if
END MAC.
18. What is the difference between the
microprocessor and microcontroller?
Microprocessor
does not contain RAM, ROM and I/O ports on the chip. But a microcontroller
contains RAM, ROM and I/O ports and a timer all on a single chip.
19. What
is assembler?
The
assembler translates the assembly language program text which is given as input
to the assembler to their binary equivalents known as object code. The time
required to translate the assembly code to object code is called access time.
The assembler checks for syntax errors & displays them before giving the
object code.
20. What
is loader?
The
loader copies the program into the computer’s main memory at load time and
begins the program execution at execution time.
21. What
is linker?
A linker
is a program used to join together several object files into one large object
file. For large programs it is more efficient to divide the large program
modules into smaller modules. Each module is individually written, tested &
debugged. When all the modules work they are linked together to form a large
functioning program.
22
.Explain ALIGN & ASSUME.
The ALIGN
directive forces the assembler to align the next segment at an address
divisible by specified divisor. The format is ALIGN number where number can be
2, 4, 8 or 16. Example ALIGN 8.
The
ASSUME directive assigns a logical segment to a physical segment at any given
time. It tells the assembler what address will be in the segment registers at
execution time. Example ASSUME CS: code, DS: data, SS: stack
23.
Explain PTR & GROUP
A program
may contain several segments of the same type. The GROUP directive collects
them under a single name so they can reside in a single segment, usually a data
segment. The format is Name GROUP Seg-name,…..Seg-name
PTR is
used to assign a specific type to a variable or a label. It is also used to
override the declared type of a variable.
24.
Explain about MODEL
This
directive provides short cuts in defining segments. It initializes memory model
before defining any segment. The memory model can be SMALL, MEDIUM,
COMPACT or LARGE.
25
Explain PROC & ENDP
PROC
directive defines the procedures in the program. The procedure name must be
unique. After PROC the term NEAR or FAR are used to specify the type of
procedure. Example FACT PROC FAR. ENDP is used along with PROC and defines the
end of the procedure.
26.
Explain SEGMENT & ENDS
An
assembly program in .EXE format consists of one or more segments. The starts of
these segments are defined by SEGMENT and the end of the segment is indicated
by ENDS directive. Format Name SEGMENT
27.
Explain TITLE & TYPE
The TITLE
directive helps to control the format of a listing of an assembled program. It
causes a title for the program to print on line 2 of each page of the program
listing. Maximum 60 characters are allowed. Format TITLE text. TYPE operator
tells the assembler to determine the type of specified variable in bytes. For
bytes the assembler gives a value 1, for word 2 & double word 4.
28 Define
SOP
The
segment override prefix allows the programmer to deviate from the default
segment
Eg : MOV
CS: [BX] , AL
29 Define
variable.
A
variable is an identifier that is associated with the first byte of data item.
In assembly language statement: COUNT DB 20H, COUNT is the variable.
30. What
are procedures?
Procedures
are a group of instructions stored as a separate program in memory and itis
called from the main program whenever required. The type of procedure depends
on where the procedures are stored in memory. If it is in the same code segment
as that of the main program then it is a near procedure otherwise it is a far
procedure.
31.
Explain the linking process.
A linker
is a program used to join together several object files into one large object
file. The linker produces a link file which contains the binary codes for all
the combined modules. It also produces a link map which contains the address
information about the link files. The linker does not assign
Absolute
addresses but only relative address starting from zero, so the programs are
relocatable & can be put anywhere in memory to be run.
32,
Define variable
A
variable is an identifier that is associated with the first byte of data item.
In assembly language statement: COUNT DB 20H, COUNT is the variable.
33. What
are procedures?
Procedures
are a group of instructions stored as a separate program in memory and it is
called from the main program whenever required. The type of procedure depends
on where the procedures are stored in memory. If it is in the same code segment
as that of the main program then it is a near procedure otherwise it is a far
procedure.
34.
Explain the linking process.
A linker
is a program used to join together several object files into one large object
file. The
linker produces a link file which contains the binary codes for all the
combined modules. It also produces a link map which contains the address
information about the link files. The linker does not assign absolute addresses
but only relative address starting from zero, so the programs are relocatable
& can be put anywhere in memory to be run.
35. Compare Procedure & Macro.
Procedur
Accessed by CALL & RET instruction
during program execution
Machine code for instruction is put only once
With procedures less memory is required
Parameters can be passed in registers, memory
locations or stack
Macro
Accessed during assembly with name to macro when
defined
Machine code is generated for instruction each time
when macro is called
With macro more memory is required
Parameters passed as part of statement which
36.
What is the maximum memory size that can be
addressed by 8086?
In 8086,
an memory location is addressed by 20 bit address and the address bus is 20 bit
address and the address bus is 20 bits. So it can address up to one mega byte
(2^20) of memory space.
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.