Computer Multitasking Real-Time Computing
Computer Multitasking Real-Time Computing
1. What are the three registers which control the I/O ports and explain their use briefly? (6 Marks)
2. What do you know about interrupts and its use? (5 Marks)
Interrupts are commonly used by hardware devices to indicate electronic or physical state
changes that require attention. Interrupts are also commonly used to implement computer
multitasking, especially in real-time computing. Systems that use interrupts in these ways are
said to be interrupt-driven.[2]
3. Briefly explain the following communication protocols and give concrete example of their use?
(24 Marks)
A. I2C
B. USART
C. SPI
D. Parallel streaming
4. USART and SPI both are serial communication protocols, what is their main difference? (2 Marks)
USART is hardware - Universal Synchronous Asynchronous Receive &
Transmit Engine.
No fixed protocol (7,8 or 9 bit with or without Receiver Addressing) but is
normally capable of protocols that incorporate:
Asynchronous - usually RS232, RS422 & RS485 - two wires TX & RX with pre-
defined data rate and receiving synchronized to incoming data stream. No
pre-defined master or slave and may be full duplex.
Synchronous - two wires, fixed Clock (from single master) and Data - half-
duplex - 8 or 9 bit & no slave address
Several I2C multi-masters can be connected to the same I2C bus and operate
concurrently. By constantly monitoring SDA and SCL for start and stop
conditions, they can determine whether the bus is currently idle or not. If the bus
is busy, masters delay pending I2C transfers until a stop condition indicates that
the bus is free again.
However, it may happen that two masters start a transfer at the same time.
During the transfer, the masters constantly monitor SDA and SCL. If one of them
detects that SDA is low when it should actually be high, it assumes that another
master is active and immediately stops its transfer. This process is
called arbitration.
6. Write the segment of assembly code which can check whether the number is divisible by 4 or
not? (5 Marks)
7. Briefly explain address DE multiplexing of 8085 and 8086 microprocessors
and its advantages?
8. Briefly explain the memory address generation of 8086? And why we need it?
- Code segment register (CS): is used for addressing memory location in the code
segment of the memory, where the executable program is stored.
- Instruction pointer The IP is also 16-bits in length and identifies the location of the
next word of instruction to be fetched from the current code segment of memory. It
- Data segment register (DS): points to the data segment of the memory where the
data is stored.
9. If the data segment address is 0x5CA2, and source index address is 0xAE9C, calculate the
physical address of the memory?
10. Among the five status flags, which are set to 1 when the following program runs? (3 Marks)