Home

Two mark Questions - 8086 Microprocessor

46. Define variable

Ans: 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.

47. What are procedures?

Ans:  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.

48. Explain the linking process:

Ans:  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.

49. Explain about passing parameters using registers with example:

Ans:  Procedures process some data or address variable from the main program, for processing it is necessary to pass the address variables or data. This is called passing parameters to procedures. In passing parameters using registers the data to be passed is stored in registers & these registers are accessed in the procedure to process the data.

CODE SEGMENT
MOV AL, DATA
CALL PRO1
PRO1 PROC NEAR
MOV INPUT, AL
RET
PRO1 ENDP
CODE ENDS

50. What is recursive procedures?

Ans:  A recursive procedure is a procedure, which calls itself. Recursive procedures are used to work with complex data structures called trees. If the procedure is called with N=3, then the N is decremented by 1 after each procedure CALL and the procedure is called until N=0.

51. What are libraries?

Ans:  Library files are collection of procedures that can be used in other programs. These procedures are assembled and compiled into a library file by the LIB program. The library file is invoked when a program is linked with linker program. when a library file is linked only the required procedures are copied into the program. Use of library files increase s/w reusability & reduce s/w development time.

52. What are Macros?

Ans:  Macro is a group of instruction. The macro assembler generates the code in the program each time where the macro is called. Macros are defined by MACRO & ENDM directives. Creating macro is similar to creating new opcodes that can be used in the program

  • INIT MACRO
  • MOV AX, data
  • MOV DS
  • MOV ES, AX
  • ENDM

53. How do 8086 interrupts occur?

Ans:  An 8086 interrupt can come from any of the following three sources

  • External signals
  • Special instructions in the program
  • Condition produced by instruction

54. What are the 8086 interrupt types?

Ans:  Dedicated interrupts

  • Type 0: Divide by zero interrupt
  • Type 1: Single step interrupt
  • Type 2:Non maskable interrupt
  • Type 3: Breakpoint
  • Type 4: Overflow interrupt

       Software interrupts

  • Type 0-255

55. What is interrupt service routine?

Ans:  Interrupt means to break the sequence of operation. While the CPU is executing a program an interrupt breaks the normal sequence of execution of instructions & diverts its execution to some other program. This program to which the control is transferred is called the interrupt service routine.

56. Define BIOS

Ans:  The IBM PC has in its ROM a collection of routines, each of which performs some specific function such as reading a character from keyboard, writing character to CRT. This collection of routines is referred to as Basic Input Output System or BIOS.

57. Explain PUBLIC

Ans:  For large programs several small modules are linked together. In order that the modules link together correctly any variable name or label referred to in other modules must be declared public in the module where it is defined. The PUBLIC directive is used to tell the assembler that a specified name or label will be accessed from other modules. Format PUBLIC Symbol.

58. Explain DUP

Ans:  The DUP directive can be used to initialize several locations & to assign values to these locations. Format Name Data_Type Num DUP (value) Example TABLE DW 10 DUP (0). Reserves an array of 10 words of memory and initializes all 10 words with 0. array name is TABLE.

59. Compare Procedure & Macro

Ans:

Procedure  Macro
Accessed by CALL & RET instruction Accessed during assembly with name given during program execution to macro when defined
Machine code for instruction is put only once
in the memory
Machine code is generated for instruction each time when macro is called.
With procedures less memory is required With macro more memory is required
Parameters can be passed in registers, memory locations or stack Parameters passed as part of statement which
calls macro

60. Define: Multiprogramming

Ans:  If more than one process is carried out at the same time, then it is know as multiprogramming. Another definition is the interleaving of CPU and I/O operations among several programs is called multiprogramming. To improve the utilization of CPU and I/O devices, we are designing to process a set of independent programs concurrently by a single CPU. This technique is known as multiprogramming.

1     2     3      4      5