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

  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 a function in linux assembly

Write a function in Linux assembly

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Design a simple digital clock

Design a simple digital clock

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Write an assembly language program

Write an assembly language program for encrypting alphabates of a string

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Write assembly program-find right admission price to movie

Write the Assembly program to find correct admission price to movie. Price of admission to a movie is $7 for kids (under 12) and $9 for adults.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

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