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

  Use maries isa program a stack structure for unsigned

use maries isa program a stack structure for unsigned integers.stackyou should write three subroutines for the stack

  Assembly language program that generates and displays

Write a assembly language program that generates and displays 20 random strings, each consisting of ten letter(A-Z, a-z)s or number(0-9)s.

  Hexadecimal number that can be stored in eax

The largest 24 bits signed hexadecimal number that can be stored in EAX and table with hexadecimal numbers only.

  Draw a flow chart for this

Draw a Flow Chart for this 8051 assembly language program below. This program calculate y=x^2+ 2x+9. Register R0 has the x, and at the end of the program R2 should have y. (Test program for x=9).

  Implement assembly language program to find greatest value

Write an assembly language program that will accept two 1-digit numbers (from 0 to 9) from the keyboard, compare the two numbers, and then print out the number of greatest value.

  Implement a simple login and password system

You are to implement a simple login and password system. Your system should allow for TEN usernames and their associated passwords to be stored.

  Give a disadvantage of self-modifying code

Devise an addressing mechanism that allows an arbitrary set of 64 addresses, not nec- essarily contiguous, in a large address space to be specifiable in a 6-bit field. Give a disadvantage of self-modifying code that was not mentioned in the text..

  Write a code block to print the transpose of cha

Write a code block to print the content of chA as it is shown above and write a code block to print the transpose of chA.

  It has three integer parameters, and it is a value-returning

That is, its name is discr , it has three integer parameters, and it is a value-returning procedure.Follow the cdecl protocol and write a short windows32 test-driver program to test the procedure.

  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

  Design and develop an embedded system

Assembly language program to control the operation of the embedded system and thorough testing to ensure correct operation of system

  Requirementsthis project requires you to program a

requirementsthis project requires you to program a maze-type game using assembly language. it is not acceptable to use

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