Solved–Assignment 5 –Solution

$35.00 $24.00

Name: Direction: Upload your typed solutions in a le named \assignment05.txt” to your Github account. 1. List and brie y de ne the possible states that de ne an instruction execution with interrupts. 2. List and brie y de ne two approaches to dealing with multiple interrupts. 3. Write the following C++ functions for a…

You’ll get a: . zip file solution

 

 
Categorys:

Description

5/5 – (2 votes)

Name:

Direction: Upload your typed solutions in a le named \assignment05.txt” to your Github account.

1. List and brie y de ne the possible states that de ne an instruction execution with interrupts.

2. List and brie y de ne two approaches to dealing with multiple interrupts.

3. Write the following C++ functions for a memory module.

A void function named Initialize() that takes a fstream reference parameter and an int parameter named ram. It rewrites the le referenced by ram with 100 rows of 32-character strings of zero.

A string function named Read() that takes a fstream reference parameter and an int parameter named ram and addr respectively. If addr is between 0 and 99 inclusively, the function returns the line of the le referenced by ram whose value equals addr ; otherwise, it returns an empty string. The rst line starts from 0.

A void function named Write() that takes a fstream reference parameter, a string parameter and an int parameter named ram, data and addr . If addr is between 0 and 99 inclusively, the function writes data on the line equal to addr of the le referenced by ram; otherwise, it does nothing.