Write a assembly language program that inputs characters

Assignment Help Assembly Language
Reference no: EM131566861

Assignment: Assembly program

You are to design, write, test, and debug a MARIE assembly language program that inputs a sequence of characters from the set A-Z (capital letters only), stores each character in memory after it is transformed by the trivial ROT13 cipher, and then, after character input completes, outputs the transformed characters.

A template source code file (Project-2_Start.mas) is provided with this assignment. Edit this file to create a program that meets the program specifications. Note that the template includes instructions to initialize some working values that your program can use. The template also defines memory locations. You may add data memory locations. The program can be designed without additional data locations, but it may be necessary to do so for your design.

For full credit, your solution must perform the functions and satisfy the requirements specified below.

a)The first instruction of the program must be placed at location (address) 0x100 (100 hexadecimal) in MARIE's memory. This is accomplished by following the program template that is provided.

b)The constant data values (One, ChA, ChZ, ChPer, Val13, Start) should not be changed by the program. The program can load from these memory locations, but should not store to them.

c)Transformed input characters must be stored in successive memory locations beginning at location 0x200 (200 hexadecimal) as indicated in the program template. The program should store all transformed input characters before any characters are output.

d)The program should always initialize the values for Ptr in the working data memory and not rely on the values for these locations that are defined in the assembly source file. This initialization is done by the provided template file.

e)The program should work for any inputs ‘A' through ‘Z' and ‘.' (a period terminates input). In the interest of keeping the program simple, the program does not need to validate inputs.

f)When transformed characters are stored and when transformed characters are output, the program must use a loop and indirect addressing to access the values in the array of words. Note that variable Ptr is initialized in the template code and should be used in the loop. You may also define a Count variable to count the number of characters, but there are also correct designs that do not require a Count variable.

g)The program should operate as follows. Input Phase:

1.A character (A-Z or ‘.') is input. MarieSim allows the user to input a single character that is read into the accumulator (AC) with an Input instruction.

2.If character ‘.' (period) is input, then the input phase ends and the output phase begins (step 5 below). (The period may be stored in memory to mark the end of the characters or the characters can be counted to determine how many transformed characters to output during the output phase.)

3.The character that is input is transformed using the trivial ROT13 cipher (see Section 5.1).

4.The transformed character is stored in the next location in the block of memory beginning at location Start. (Variable Ptr must be updated and indirect memory addressing must be used.) Output Phase:

5.All transformed characters are output, beginning with the first character that was transformed. The ‘.' character is not to be output. (This will require a loop using variable Ptr and indirect addressing. Note that the number of characters to output will vary and the program must know when to stop the output by relying on a ‘.' or other special character in memory, counting the number of input characters during the input phase, or some other method.)

6.After all characters are output, the program halts by executing the HALT instruction.

Reference no: EM131566861

Questions Cloud

Explain what leadership means to you : Explain what leadership means to you. What is the connection between leadership and psychology?
Write a paper discussing how you would market the product : Write a paper discussing how you would market the product.Developed a new sports drink that is in a container that will keep it cool.
Conducting a swot analysis : Do the exercise Skill-Building "Conducting a SWOT Analysis": After reading the instruction for this exercise, take a goal from your Company.
Gonzales corporation expected terminal enterprise value : what is Gonzales Corporation's expected terminal enterprise value in year 2?
Write a assembly language program that inputs characters : You are to design, write, test, and debug a MARIE assembly language program that inputs a sequence of characters from the set A-Z (capital letters only).
An analytical report on preventing security issues : An Analytical Report on Preventing Security Issues via a Network and Information Security Solution
Reflection about your perception of long-term care : Write a reflection about your perception of long-term care and the population it serves.
Example of jean-jacques rousseau : According to the article, A Portrait of the Teacher as Friend and Artist: The example of Jean-Jacques Rousseau (2011), three ways a person can teach by example.
Review the case of the us defence secretary : The US defence secretary claimed in 1985 that Congress had reduced the defence budget. Representative Gray pointed out that the budget had not been reduced.

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