0% found this document useful (0 votes)
6 views4 pages

Microprocessor Programming Exam Sets

Uploaded by

homkarpranav7
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

Microprocessor Programming Exam Sets

Uploaded by

homkarpranav7
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MICROPROCESSOR PROGRAMMING (314321)

SMART QUESTION PAPER SETS – 3 SETS

MSBTE PATTERN – 3 Hours / 70 Marks

------------------------------------------------------------

===========================

SMART SET – 1

===========================

Q1) Attempt any 7 (10 Marks)

1) Explain architecture of 8086 with block diagram.

2) Describe BIU and EU functions.

3) Explain instruction queue and pipelining.

4) Define and explain offset, segment, physical address.

5) Explain PSW/flag register with diagram.

6) Explain addressing modes with any two examples.

7) State the functions of general-purpose registers.

Q2) Attempt any 4 (12 Marks)

1) Explain program development steps in assembly.

2) Explain assembler directives: DB, DW, ORG, END.

3) Differentiate TASM, MASM, LINKER, DEBUGGER.

4) Explain instruction format of 8086 with diagram.

Q3) Attempt any 4 (12 Marks)

1) Explain data transfer instructions with examples.

2) Explain arithmetic instructions with examples.

3) Explain logical instructions with examples.

4) Explain string instructions & role of DF flag.

Q4) Attempt any 4 (12 Marks)

1) ALP for addition of two 16-bit numbers.

2) ALP to find smallest number from array.

3) ALP for counting even and odd numbers.

4) ALP to reverse a string.

Q5) Attempt any 3 (12 Marks)


1) ALP using procedures for arithmetic operations.

2) Macro for block transfer operations.

3) Compare procedure and macro.

------------------------------------------------------------

===========================

SMART SET – 2

===========================

Q1) Attempt any 7 (10 Marks)

1) Draw pin diagram of 8086 and explain.

2) Explain minimum and maximum mode operations.

3) Explain memory segmentation and its advantages.

4) Explain physical address generation with example.

5) Explain interrupt structure of 8086.

6) Explain stack and stack-related instructions.

7) Explain any two conditional jump instructions.

Q2) Attempt any 4 (12 Marks)

1) Explain assembler directives with examples.

2) Explain role of linker and loader.

3) Explain addressing modes: direct, indirect, indexed.

4) Explain logical, rotate, and shift instructions.

Q3) Attempt any 4 (12 Marks)

1) Explain MUL, IMUL instructions.

2) Explain DIV, IDIV instructions.

3) Explain BCD arithmetic: DAA & DAS.

4) Explain CALL variants: NEAR, FAR, conditional.

Q4) Attempt any 4 (12 Marks)

1) ALP for multiplication of two 8-bit numbers.

2) ALP to divide two 16-bit numbers.

3) ALP to sort array in ascending order.

4) ALP to find length of string without using string instruction.

Q5) Attempt any 3 (12 Marks)


1) ALP using procedure for equation Z = (A+B)*(C+D).

2) Macro for string copying operation.

3) Advantages and disadvantages of macros.

------------------------------------------------------------

===========================

SMART SET – 3

===========================

Q1) Attempt any 7 (10 Marks)

1) Explain internal architecture of 8086.

2) Explain importance of queue in BIU.

3) Explain flag register & its classification.

4) Explain memory mapped & I/O mapped I/O.

5) Explain XLAT, LEA, and XCHG instructions.

6) Explain DOS function calls: AH=01, AH=09.

7) Explain the concept of re-entrant procedures.

Q2) Attempt any 4 (12 Marks)

1) Explain all string instructions in detail.

2) Explain hardware interrupts: NMI, INTR.

3) Explain LOOP instructions with flowchart.

4) Explain instruction execution cycle.

Q3) Attempt any 4 (12 Marks)

1) Explain SAL, SAR instructions with examples.

2) Explain RCL, RCR, ROL, ROR instructions.

3) Explain SCAS, CMPS instructions.

4) Explain assembler models (TINY, SMALL, LARGE).

Q4) Attempt any 4 (12 Marks)

1) ALP to convert HEX to BCD.

2) ALP to convert ASCII to HEX.

3) ALP to copy block of memory.

4) ALP to compare two strings.

Q5) Attempt any 3 (12 Marks)


1) ALP using procedures for advanced string tasks.

2) ALP using macros for arithmetic batch operations.

3) Compare modular programming vs monolithic programming.

------------------------------------------------------------

END OF SMART SETS

Common questions

Powered by AI

Assembler directives such as DB (Define Byte), DW (Define Word), ORG (Origin), and END play essential roles in assembly programming for the 8086 microprocessor by instructing the assembler on how to interpret given code. DB and DW are used to allocate memory and initialize data, where DB reserves space for a byte and DW for a word. ORG sets the starting address for code or data, helpful in controlling the memory layout. END indicates the end of the source code to the assembler. These directives help control the translation of assembly code into machine code, ensuring efficient resource utilization during execution .

In the 8086 microprocessor, memory segmentation divides the 1MB addressable memory into segments, each up to 64KB in size, which are accessed using segment registers. This segmentation allows the organization of program code, data, and stack into different memory segments, facilitating modularity and efficiency. The primary advantage is the ability to work with a large amount of memory while maintaining fast access. By overlapping segments, programs can effectively utilize memory protected from accidental overwriting. Segmentation also allows different parts of the program or data to be loaded or moved independently, improving flexibility and overall system performance .

Procedures and macros are constructs in assembly language that facilitate modular code development. Procedures are blocks of code that perform a specific task and can be called from different points in a program; they support parameter passing and maintain scope for local variables, enabling code reusability and clarity. Macros are code templates that expand inline when invoked, which can increase code size but offer the advantage of reduced execution time since no function call overhead is involved. While procedures are compact and maintainable, macros perform repeated tasks efficiently during execution but can lead to larger binary size due to code duplication .

MUL and IMUL are multiplication instructions in the 8086 microprocessor, where MUL is used for unsigned multiplication and IMUL for signed multiplication. MUL multiplies the content of the accumulator with a general-purpose register or memory, placing the result in AX or DX:AX for wider operations. IMUL operates similarly but accounts for the sign bit, making it suitable for arithmetic involving negative numbers. These instructions are used in contexts where size and sign of operands must be considered separately, allowing precise arithmetic operations in both integer and financial calculations .

Stack-related instructions in the 8086 microprocessor, such as PUSH, POP, CALL, and RET, manage the Last-In-First-Out (LIFO) data structure used for temporary storage and function call management. PUSH saves data to the top of the stack, while POP retrieves it, facilitating temporary data storage. CALL places the return address on the stack before jumping to a procedure, and RET extracts it from the stack to resume execution flow after procedure execution. This mechanism efficiently manages nested function calls, return addresses, and parameter passing, providing a systematic way of handling execution contexts and local data storage .

In the 8086 microprocessor, hardware interrupts like Non-Maskable Interrupt (NMI) and Interrupt Request (INTR) enhance processing efficiency and responsiveness by allowing the CPU to respond to external events. NMI is non-maskable, meaning it cannot be ignored, and it is prioritized for critical tasks like power down or hardware failure alerts, ensuring essential events receive immediate attention. INTR is maskable, allowing routine tasks to be deferred when necessary. These interrupts enable asynchronous processing, improve real-time performance, and support multi-tasking by facilitating reactive event handling .

The instruction queue in the Bus Interface Unit (BIU) of the 8086 microprocessor is significant because it allows the fetching of subsequent instructions while the current instruction is being executed in the Execution Unit (EU), facilitating pipelined processing. The BIU pre-fetches up to six bytes of program instructions into the queue, which permits instruction execution to happen concurrently with instruction fetching. This method enhances processing efficiency by reducing waiting times associated with fetching instructions, ensuring that execution units are consistently fed with instructions, thereby optimizing CPU cycles and improving throughput .

TASM (Turbo Assembler) and MASM (Microsoft Macro Assembler) both serve as assemblers that convert assembly language into machine code. MASM provides support for advanced directives and optimization features, while TASM is known for its compatibility with Borland development environments. The LINKER combines multiple object files generated by an assembler into a single executable file, resolving cross-file references and resource allocations. DEBUGGER is a tool used for testing and inspecting the execution of code, allowing step-by-step code analysis to detect and fix errors. These tools together streamline the development process, facilitating efficient program assembly, linking, and debugging .

General-purpose registers in the 8086 microprocessor, namely AX, BX, CX, and DX, serve multiple roles such as temporaries and counters in various calculations. AX functions as an accumulator for arithmetic operations, BX often acts as a base pointer for addressing, CX is typically used as a counter in repetitive operations like loops, and DX is used in operations that require additional temporary storage for results. These registers contribute to overall efficiency by providing fast internal storage for variables and intermediate calculations, reducing the load on memory accesses and facilitating efficient data manipulation .

The 8086 microprocessor's architecture comprises two main components: the Bus Interface Unit (BIU) and the Execution Unit (EU). The BIU is responsible for interfacing with the external system buses, managing all bus cycles, and managing the instruction queue that allows the pre-fetching of instructions, thus increasing processing efficiency through pipelining. The EU decodes instructions fetched by the BIU, executes arithmetic and logic operations, and controls the data flow within the processor using registers such as General Purpose and Special Purpose Registers. The architecture is designed to enhance internal data operations and external communication, effectively utilizing parallel processing capabilities .

You might also like