Tuesday, 9 August 2011

8086 TECHNICAL INTERVIEW QUESTIONS.

What is the difference between 8085 and 8086 in microprocessor?
·         8086 has a special concept called as memory segmentation. It allows parallel processing, while 8085 does not.
·         8085 is a 8-bit micro processor,8086 is a 16-bit processor
·         8086 can have 20-bit address bus
8085 can have 16-bit address bus

What are the flags in 8086?
In 8086 Carry flag, Parity flag, Auxiliary carry flag, Zero flag, Overflow flag, Trace flag, Interrupt flag, Direction flag, and Sign flag.

What are the various interrupts in 8086?
Maskable interrupts, Non-Maskable interrupts.

What is Non-Maskable interrupts? 
An interrupt which can be never be turned off (ie.disabled) is known as Non-Maskable interrupt.

Which interrupts are generally used for critical events? 
Non-Maskable interrupts are used in critical events. Such as Power failure, Emergency, Shut off etc.,

What is the Maximum clock frequency in 8086?
The clock frequency was originally limited to 5 MHz (IBM PC used 4.77 MHz), but the last versions in HMOS were specified for 10 MHz.

What are the various segment registers in 8086? 
Code, Data, Stack, Extra Segment registers in 8086.


What do u mean by assembler?
Assembler, for an assembly language, a computer program to translate between lower-level representations of computer programs. An assembler converts basic computer instructions into a pattern of bits which can be easily understood by the computer and the processor can use it to perform its basic operations.

What do u mean by linker?
In computer science, a linker or link editor is a program that takes one or more objects generated by a compiler and combines them into a single executable program.


What do u mean by compiler?
A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program.

What do u mean by emulator?
An emulator is hardware and/or software that duplicates (or emulates) the functions of a first computer system in a different second computer system, so that the behavior of the second system closely resembles the behavior of the first system.


What is meant by cross-compiler?
A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is run. Cross compiler tools are used to generate executables for embedded system or multiple platforms.

What is assembler directives?
An assembler directive is a message to the assembler that tells the assembler something it needs to know in order to carry out the assembly process
eg: EQU,ORG,END


Which Segment is used to store interrupt and subroutine return address registers?  Stack Segment in segment register is used to store interrupt and subroutine return address registers.

Which Flags can be set or reset by the programmer and also used to control the operation of the processor?
Trace Flag, Interrupt Flag, Direction Flag.

What does EU do?
Execution Unit receives program instruction codes and data from BIU, executes these instructions and store the result in general registers.

Which microprocessor accepts the program written for 8086 without any changes?  8088

What is the difference between 8086 and 8088?
The BIU in 8088 is 8-bit data bus & 16- bit in 8086.Instruction queue is 4 byte long in 8088and 6 byte in 8086.

What are the different functional units in 8086?
Bus Interface Unit and Execution unit, are the two different functional units in 8086

Logic calculations are done in which type of registers?
Accumulator is the register in which Arithmetic and Logic calculations are done.


How many pin IC 8086 is? – 40 Pin

What is 8087? How it is different from 8086?
The Intel 8087, announced in 1980, was the first floating-point coprocessor for the 8086 line of processors;

Why 8085 processor is called an 8 bit processor?
Because 8085 processor has 8 bit ALU (Arithmetic Logic Unit). Similarly 8086 processor has 16 bit ALU.

What is 1st / 2nd / 3rd / 4th generation processor?
The processor made of PMOS / NMOS / HMOS / HCMOS technology is called 1st / 2nd / 3rd / 4th generation processor, and it is made up of 4 / 8 / 16 / 32 bits.

Define HCMOS?
High-density n- type Complementary Metal Oxide Silicon field effect transistor.

Differentiate between RAM and ROM?
RAM: Read / Write memory, High Speed, Volatile Memory. ROM: Read only memory, Low Speed, Non Volatile Memory.

Difference between static and dynamic RAM?
Static RAM: No refreshing, 6 to 8 MOS transistors are required to form one memory cell, Information stored as voltage level in a flip flop. Dynamic RAM: Refreshed periodically, 3 to 4 transistors are required to form one memory cell, Information is stored as a charge in the gate to substrate capacitance.

Can ROM be used as stack?
 ROM cannot be used as stack because it is not possible to write to ROM.

In memory mapped I/O system which of the following instruction will not be there
  1. LDA  2. STA 3.ADD  4.OUT        Ans : OUT

Maximum no of bits required in the ASCII table set is – 7 bits

Describe segmentation & pipelining in 8086.

What is the size of data bus in 8086?

What is the size of address bus in 8086?

What is the max memory addressing capacity of 8086?

What is the size of flag register?

How many bit combinations are there in a byte?

Sunday, 7 August 2011

MASM EXTRA LAB QUESTIONS


1.      To Read a hexadecimal number from keyboard and display it
2.      To find factorial of a number below and display it
3.      To find the square root of a number
4.      Sum and average of number stored in array
5.      Checking for palindrome
6.      Write a pgm the sum of two numbers using MASM
7.      Write an 8086 MASM pgm to reverse an input string
8.      Write an 8086 MASM pgm to count the number of words in a text entered from keyboard. Also verify the output
9.      Write a MASM pgm to print the Fibonacci numbers upto 1000
10.  Write an MASM pgm to count the number of vowels in a text matter input from keyboard also print the result

Friday, 5 August 2011

Sepper Motor Interface with 8086


            A unique type of motor useful for moving things in small increments is stepper motor. A stepper motor is a digital motor because it is moved in discrete steps; as it traverses through 360o   We are using a permanent magnet type in this example. The stepper motor find extensive applications in printers, robotics etc.. The size is 360o/(Ns.Nr). Ns is the number of static pole, Nr is the number of pairs of rotor poles. Generally step size of a stepper motor depends upon Nr. These stable positions can be obtained by simply energizing the windings on anyone of the stator poles with a D.C. There are 3 different schemes available for “stepping a stepper motor”.
These are:
a)      wave scheme.
b)      Two phase scheme.
c)      Half stepping or mixed scheme

Two – phase scheme:

Two adjacent stator windings are energized. There are two magnetic fields active in quadrature and more if the motor pole faces can be in direct alignment of the motor poles is of course possible.
            Typical equilibrium conditions of the rotor are when the windings on two successive stator poles are excited. In step a) A1 and B1 are energized. The pole face S2 with B1 (N). the north pole N3 of rotor finds itself in the neutral zone between A1 (N) and B1 (N). S1 and S2 of the rotor positions themselves symmetrically with the two stator north pole.

            Next when B1 and B2 are energized S2 tends to align with B1 (N) and S3 with A2 (N). Align under equilibrium conditions only partial alignment is possible and N1 finds itself in neutral regions, midway between B1 (N) and A2 (N) in slip (b). In slip (c), A2 (N) and B2 (N) are ON, S3 AND S1 tends to align with A2 (N) and B2 (N) respectively with N2 in the neutral zone. Step (b) is the case when A1 and B2 are ON. Two phase drives produces more torque than wave drives. Switching sequence for the 2 phase scheme is given:


          ANTICLOCKWISE                                          CLOCKWISE
Step
A1
A2
B1
B2
****
****
****
****
****
Step
A1
A2
B1
B2
1
1
0
0
1
1
1
0
1
0
2
0
1
0
1
2
0
1
1
0
3
0
1
1
0
3
0
1
0
1
4
1
0
1
0
4
1
0
0
1




Hardware Descriptions:

            Among the Vi range of add-on cards, the VLIM 013A supports the stepper motor interface. This board can be plugged into 8255 PPI connector in any kit using 26 core cable. It consists of 3 sections. They are:
(i)                 Address decoding
(ii)               Stepper motor driving circuitry.
(iii)             Operating voltage selection.

(i) Address Decoding:
           
           20H – PORTA   
           26H – CONTROL REGISTER

(ii) Driving Circuitry:

            Stepper motor requires large logic signals of relatively high power. In this board, silicon Darlington pair transistors are used to supply that required power. The driving pulses are generated under software by the interface circuit. The inputs of interface circuit are TTL pulses generated under software control using a microprocessor trainer kit. The Darlington pair transistors drive the stepper motor as they withstand high current. A 220Ω resistor and 1N4148 diode are connected between the power supply and the collector for supporting fly-back current.










PROCEDURE:

  1. Set up the interface and stepper motor properly.
  2. Determine the scheme, whether it is half-stepping, 2- phase or wave scheme.
  3. Connect the buses properly.
  4. Execute the program and verify the output.
(a)   For the first program, different speeds are achieved by changing delay time.





Sample Programs

(To run a stepper motor at different speeds)

MOV   AL, 80H
OUT    0026H, AL
L3:                   MOV   SI,1050H
MOV   BL, 04H
L2:                   MOV   AL,[SI]
OUT    0020H, AL
CALL L1
INC     SI
DEC    BL
JNZ     L2
JMP     L3
L1:                   MOV CX, 0A03
L4:                   DEC    CX
JNZ     L4
RET    








Thursday, 4 August 2011

8086 EXTRA LAB QUESTIONS


1.      Sorting N elements in ascending order
2.      Sorting in descending order
3.      Sum of 8 bit numbers
4.      Write an 8086 ALP to find out Square root of a given number
5.      Write an 8086 ALP  to find the square root of a given no
6.      Write an 8086 alp to sort an array into even and odd . also print the even & odd numbers separately in memory locations.
7.      Write an 8086 ALP to find Fibonacci series from 0 to 100.
8.      Write a pgm to count the odd and  even numbers from the given sequence using 86 and store result in 3000 & 3001 locations
7AH,7BH,7CH,7DH,7FH,7EH,ABH,ACH
9.      Write an ALP to solve the sequence using 8086 1+2+3+4+…+50. Result store in 2500.
10.  86 ALP to find odd numbers in series and store starting from 2500H
11.  Write  8086 ALP to count of a particular number in a series
12.  Write an alp to find the sum of ‘n’ numbers . if ‘n’ is even and find average if n is odd
13.  Write a pgm to display two largest numbers from an array of n numbers
14.  Write a pgm to display prime numbers less than 10 using 8086 kit
15.  Write a ALP to check whether a given number is prime or not . if the number is not prime then find its factorial
16.  Write ALP to find the sum and average of n number from an array
17.  Write an alp to find the sum and average of 32 bit numbers
18.  Generate the series 0,1,1,2,3.5,8

Wednesday, 3 August 2011

8051 EXTRA LAB QUESTIONS


1.      Addition of two 16-bit numbers
2.      Subtraction of two 8-bit numbers
3.      Multiplication of two 8 bit Numbers
4.      Division of  two 8 bit numbers
5.      1’s and 2’s complement of a number
6.      Largest of N 8-bit numbers
7.      Write a program in 8051 to find the average of ‘n’ numbers and store the result in 4200
8.      Write an 8051 ALP to sort an array in even and odd numbers
9.      Write an 8051 alp to find the square root of a number
10.  Write an ALP to count the number of odd numbers and even numbers from an array of ‘n’ numbers and display count of odd numbers in 2500 and even numbers in 3000
11.  Generate the sequence using 8051  0,1,1,2,3,5,8
12.  Write an ALP to find the sum of odd numbers and even numbers from an array of ‘n’ numbers. Also display the count of odd numbers & even numbers.
13.  Write an ALP to find the sum of even numbers and odd numbers from an array of ‘n’ numbers.
14.  Write a program using 8051 to find the smallest number from the given sequence 0A,0B,0C,1B,1C,11 and store the result in memory location 4600.

Monday, 1 August 2011

8086 / 88 Trainer kit (Vi Microsystems) Assembler Commands


8086 Trainer kit Assembler Commands

#A: Line assembler . This command is used to enter the mnemonics of 8086 and it gives the opcode for mnemonics
Syntax : #A <CR>
Enter user RAM address and program
RAM location : 1000H to 6000H

Eg:       #A <CR>
            #1000<CR>

#U: Disassembler. It gives the mnemonics and corresponding opcodes in the given address.
Syntax: #U<CR>
Enter user RAM <CR>

#SB  Substitute byte. This command is used to examine the contents of selected memory
locations and modify them.
Syntax: #SB <addr><CR>   
Eg:       #SW 2500  <CR>
                        Enter input 12
                        [2500] : 12


#SW  Substitute Word.
Syntax: #SW <addr><CR>   
Eg:       #SW 2500  <CR>
                        Enter input 1234
                        [2500] : 34  , [2501]:12


#GO Go and execute. The Go command is used to run the program.
Syntax: #GO<addr><CR>

Eg:       #GO 1000  <CR>
           

Procedure to enter a program
1. Switch on the 8086 kit, Type A and enter.
2. Type in the starting address and press enter.
3. Enter the mnemonics.

Procedure to enter data
1. Press INT key.
2. Type #SB address and press enter key.
3. Update the locations with desired bytes.

Procedure to execute the program
1. Press reset key.
2. Type #GO starting address of code and press enter key.
3. Press RES/INT Key

Key Functions
RES (RESET) : This key allows the user to terminate any activity and return to an initialised state.
INT (INTERRUPT) : This key allows use to interrupt any activity and return to the command prompt