assembly code
Write the required embedded (_asm) assembler code for each section in the corresponding inline assembler blocks denoted by the _asm keyword.
See the example displayed output at the end of this assignment for guidance.
Shift to load Bytes
Write assembler code to put the values of the C++ constants byte0, byte1, byte2, and byte3 into the C++ memory variable uint32_t resultUInt32.
The bytes have to be in the following order in resultUInt32 that is displayed in hex by the C++ part of the program:
11223344
Endianess
Step through the C++ memory constant uint32_t source32Bit (0x44332211) in a byte wise manner from the lowest to the highest byte address and put the byte results into the following C++ variables:
uint8_t lowestAddressByte0Up, lowestAddressByte1Up, lowestAddressByte2Up, lowestAddressByte3Up;
Powers of 2 Multiply and Divide
The C++ code will prompt the user to enter a multiplier 1, then prompt for an exponent for a base 2 multiplier.
Write the required assembler code in the _asm code block to put the results to the C++ variable product that gets displayed by the C++ code.
The C++ code will prompt the user to enter a dividend, then then prompt for an exponent for a base 2 divisor.
Write the required assembler code in the _asm code block to put the results to the C++ variable quotient that gets displayed by the C++ code.
Use logical shifts to execute the operations for the base 2 multiply and base 2 divide.
9 years ago
15
- critical thinking response
- disregards
- English communication homework 2
- Social Contract Theory Actions for 'Social Contract Theory' Freight Rail Road is the business I am familiar with. Con Rail, Norfolk Southern or CSXT Rail Road. After reviewing the tutorial and/or podcast in the background section, discuss social contrac
- Personality Theory Paper
- eco-5
- After reading the case, answer the following questions: •Should Shell Case Fabrications (SCF)accept or reject Air Connection Links’(ACL)request? Which option would you select? What risks are involved? •How should SCF negotiate with ACL? How can SCF and AC
- Business law corporate ethics
- Module 04 Activity - Assigning Project Resources
- ENG 316