Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MASM assembly language For this assignment you will write four MASM assembly language functions that will be called from a C++ function. The four functions

MASM assembly language

For this assignment you will write four MASM assembly language functions that will be called from a C++ function. The four functions should provide equivalents to these prototypes:

  • int getIndex( int address20bit );
  • int getBlockOffset( int address20bit );
  • int getTag( int address20bit );
  • char* toLower( char[] buffer );

First three functions should accept a 20 bit address (in an int), and extract the fields indicated by the name of the function. The size of memory in bytes is indicated by the fact that an address is 20 bits. A single entry in this cache can hold 64 bytes. The Index field is 4 bits. The width of the Tag field is all the bits that remain after accounting for the Block Offset and Tag.

The values returned by these 3 functions should isolated from each other, and right shifted in the integer returned to the calling function. As an example of "isolated", the getIndex function should only return the bits that represent the Index field, right justified in an integer.

The fourth function should accept a null-terminated character array of ASCII characters, and traverse the buffer, converting any upper case letters to lower case. The buffer can possibly contain special characters, and numerics. So make sure you check the value before trying to convert it.

The calling convention is different between Windows and System V (Linux, Mac, BSD). Make sure you implemented; Windows Failure to indicate which calling convention you've implemented in the comments at the top of your assembly language source file(s) will earn a substantial points penalty.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications Dexa 2023 Workshops 34th International Conference Dexa 2023 Penang Malaysia August 28 30 2023 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Maqbool Khan

1st Edition

303139688X, 978-3031396885

More Books

Students also viewed these Databases questions

Question

please dont use chat gpt 1 3 6 0

Answered: 1 week ago

Question

10-9 How have social technologies changed e-commerce?

Answered: 1 week ago