assembly code

assembly code

  • Field: Computer Science

 

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.

  • attachment

    02_assign_Bytes_Shifter_C_Inline.zip
  • We offer what we promise and unlike others our support staffs are online 24/7. We guarantee money back if you do not get value for your Money.
  • The calculator below shall help you compute your pay for this assignment or any other assignment.
  • WE OFFER 6 HRS URGENT ORDERS AS WELL

Use DISCOUNT CODE DISC15 to enjoy 15% Discount on all orders while at the order page.
Do you need any clarifications ?????????
Contact our support staff ONLINE NOW via the CHAT.

Type of paper Academic level Subject area
Number of pages Paper urgency Cost per page:
 Total: