Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

here is the Shifter.cpp file and if you could not read my Shifter.cpp file here is the code. // BytesShifterC++InlineTemplateSolution.cpp : Defines the entry point

image text in transcribed

image text in transcribed

image text in transcribed

here is the Shifter.cpp file

image text in transcribed

image text in transcribed

and if you could not read my Shifter.cpp file here is the code.

// BytesShifterC++InlineTemplateSolution.cpp : Defines the entry point for the console application.

#include "stdafx.h" #include #include #include

using namespace std;

void main() { const uint8_t byte0(0x11), byte1(0x22), byte2(0x33), byte3(0x44); uint32_t resultUInt32(0);

cout

_asm { ; Put the values of byte0, byte1, byte2, and byte3 into the C++ memory variable uint32_t resultUInt32. ; the order in the memory variable from most significant to least should be byte0 byte1 byte2 byte3

}

cout

const uint32_t source32Bit(0x44332211); uint8_t lowestAddressByte0Up = 0, lowestAddressByte1Up = 0, lowestAddressByte2Up = 0, lowestAddressByte3Up = 0;

_asm { ; Step through by byte sizes the memory constant uint32_t source32Bit(0x44332211) from the lowest to the highest byte address ; and put the byte results into the coresponding C++ variables

}

cout

cout

cout

uint32_t multiplicand, exponentforBase2Multiplier, product;

cout = 0 for multiplicand : "; cin >> multiplicand; cout = 0 to be an exponent for base 2 multiplier : "; cin >> exponentforBase2Multiplier;

_asm { ; use shift opertor to mutiply by power of 2

}

cout

uint32_t dividend, exponentforBase2Divisor, quotient;

cout = 0 for dividend : "; cin >> dividend; cout = 0 to be an exponent for base 2 divisor : "; cin >> exponentforBase2Divisor;

_asm { ; use shift opertor to divide by power of 2

}

cout

}

COSC 2325 In this project dowaload the Shifter cpp file located within the assignment. Use this downloaded C++ program and program you create in Visual Studio. The Shifter.cpp file contains commented embedded assembler (asm) blocks. Write the required embedded (asm) assembler code for each section in the correspondimg inline assembler blocks denoted by the _asm keyword See the example displayed output at the end of this assignment for guidance. In the Explorer Visual Studio IDE Create a new solution project using the values: Bytes ShifterinineSolution CLabsiCOSC2325 In the text boxes in the screen below: New Project t Recent 4 Installed 4 Templates NET Framework 4 Sort by: Default .. Search Installed Templates Win32 Console Application Visual C. Type: Visual C A project for creating a 3Project Visual C++Win32 console application Visual C# s Visual Basic Visual F# 4 Visual C Windows ATL CLR General MFC Test Win32 Cross Platform Extensibility SOL Server o JavaScript 1 Python b Online Name: Location Solution name: lisk bers.se sosteklins and fand semslates. FytesShifter InlineSolution Browse Create directory for solution Create new Git repository ok Cancel Zip up the solution folder specified in the Name: tet box in the screen abore to use for submittal to Canvas

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_2

Step: 3

blur-text-image_step3

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 Concepts

Authors: David M Kroenke, David J Auer

6th Edition

ISBN: 0132742926, 978-0132742924

More Books

Students explore these related Databases questions