Write code for an assembly language function

Assignment Help Assembly Language
Reference no: EM13923577

Representing and Manipulating Information

1. Write code for an assembly language function named rot_left which rotates a given integer (provided in R6 by a value given in R12. The result should be returned in R4.

Your function should assume that the amount to rotate is between 0 and 31 inclusive. You are not allowed to use the rotation assembly language instructions:

neither ROR nor RRX.

Call your function from your mainline code, providing various parameters and checking the result for correctness.

2. Write a function in assembly language named encrypt which takes a pointer to a buffer containing some cleartext, and modifies the buffer to contain the encrypted version of that text.

The encryption scheme is to add a (wrap-around) displacement n to each alphabetic char. For example given the clear text

AaBbCcDdEeFfGgHhIiJjKkL1MmNnOoPpQqRrSsTtUuVvWXxYyZz

0123456789

Hello, my boots are layered like an onion.

!@#$%"&*()_-+={}[]\|
<>,.?/~;:"

and assuming for example n = 13, the result should be

NnOoPpQqRrSsTtUuVvi&XxYyZzAaBbCcDdEeFfGgHhIiJjKkL1Mm

0123456789

Uryyb, zl obbgf ner ynlrerq yvxr na bavba.

!@#$%"&*()_-+={}[]\|
<>,.?/-~ ;:"

Reference no: EM13923577

Questions Cloud

Describe each market structure discussed in the course : Describe each market structure discussed in the course (perfect competition, monopolistic competition, oligopoly, and monopoly) and discuss two of the market characteristics of each market structure.
Describe the sequence of transactions in the futures markets : If the bank wanted to hedge its exposure to failing LIBOR on this loan commitment, describe the sequence of transactions in the futures markets it could undertake.
How the topic of this article apply to your personal life : As you read the article, consider the following questions: How could the topic of this article apply to your personal or professional life, and how could it apply to an organization you have observed
Specific forms of workplace discrimination : Evaluate the specific forms of workplace discrimination prohibited under current statutory and case law. Assess the classes of people protected by current employment law
Write code for an assembly language function : Write code for an assembly language function named rot_left which rotates a given integer (provided in R6 by a value given in R12. The result should be returned in R4.
The evolution of business ethics : In a three- to five-page paper, excluding the title page and reference page, complete the following:
Chain-of-command systems : Question 1. A company whose structure, policies, and capabilities allow employees to respond quickly to customer needs and changes in the business environment is termed as a(n) _____. Question 2: Which of the following chain-of-command systems was ..
Calculate the number of futures contracts required to hedge : Calculate the number of futures contracts required to hedge $15 million of Andrew's portfolio, using the data shown. State whether the hedge is long or short. Show all calculations.
What is the biggest challenge posed by egoism : What is a code of conduct? What is its role within an organization? What is the biggest challenge posed by egoism? Summarize the influences of diversity within a workplace

Reviews

Write a Review

Assembly Language Questions & Answers

  Document the protocols for passing

You must document the protocols for passing parameters and returning the result to the subroutine and also follow the convertion of saving and restoring registers in the subroutine.

  Multiply by using shift and add instructions

How does real time PCR work to quantify the initial amount of the DNA template? How should the method be modified to quantify the initial amount of RNA template extracted from tissue or cells?

  Decimal floating point number

What decimal floating point number does this IEEE 754 single precision number represent: 0x47C0_E6B7?

  Create a assembly language subroutine

Create a assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n words and array C containing n long words

  Write an assembly language program using the pep8 assembler

Write an assembly language program using the PEP8 assembler (free download) that corresponds to the following C++ program

  How to express restrictions in register interference graph

The DEC Alpha architecture places the following restrictions on floating-point instructions. Show how to express these restrictions in the register interference graph.

  Write a nonrecursive version of the factorial procedure

(Nonrecursive Factorial) Write a nonrecursive version of the Factorial procedure (Section 8.3.2) that uses a loop. (A VideoNote for this exercise is posted on the Web site.) Write a short program that interactively tests your Factorial procedure.

  Write an assembly language program that has two subroutines

write an assembly language program that has two subroutines one for encrypting alphabates of a string and second fo

  Calculate your grades based on the number of points you get

Create a program that calculates your grades based on the number of points you accumulate over the entire semester

  Program a maze-type game using assembly language

This project requires you to program a maze-type game using Assembly Language. It is not acceptable to use any other programming language for this project. T

  Problem 1 square root for this problem you will write a

problem 1 square root for this problem you will write a short assembly program that computes the integral square root

  Write a function to convert a given function

Write a function to convert a given function from infix to postfix in assembly. The basic structure of the function is given in the attached assembly language file.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd