MARIE assembly language program

Write 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.

Program Operation

• Input phase

–Input a character (‘A’-‘Z’ or ‘.’ only)

–Apply the Rotate-13 (ROT13) transformation to the character if ‘A’-‘Z’

–Store the transformed character in memory –Repeat until the input is a period (‘.’)

• Output phase

–Output the stored characters (but not the ‘.’)

–The program halts (instruction “Halt”)

Program design

-initialize

-Input, transform, and store in memory

• Input character

• Call Rot13 to transform

• Store in memory

• Check for exit condition

-Read from memory and output

• Read character from memory

• Output character

• Check for exit condition

-Halt

Additional Requirements (1)

a) The first instruction of the program must be placed at location (address) 0x100 (100 hexadecimal) in

MARIE’s memory.

b) Constant data values should not be changed by the program.

c) Transformed input characters must be stored in successive memory locations beginning at location

0x200 (200 hexadecimal). The program should store all transformed input characters before any

characters are output.

Additional Requirements (2)

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.

e) The program should work for any inputs ‘A’ through ‘Z’ and ‘.’ (a period terminates input). 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. You may define a

Count variable to count the number of characters, but there are also correct designs that do not require

a Count variable.

Two Test Cases

• Test 1: Input the eight-character sequence “VIRGINIA” followed by a ‘.’ to terminate the input. The

ROT13 value of each character (“IVETVAVN”) should be displayed after the ‘.’ character is input.

• Test 2: Reload the program in MarieSim, without reassembling, input the fourcharacter sequence

“GRPU” followed by a ‘.’ to terminate the input.

Calculate your order
275 words
Total price: $0.00

Top-quality papers guaranteed

54

100% original papers

We sell only unique pieces of writing completed according to your demands.

54

Confidential service

We use security encryption to keep your personal data protected.

54

Money-back guarantee

We can give your money back if something goes wrong with your order.

Enjoy the free features we offer to everyone

  1. Title page

    Get a free title page formatted according to the specifics of your particular style.

  2. Custom formatting

    Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.

  3. Bibliography page

    Don’t pay extra for a list of references that perfectly fits your academic needs.

  4. 24/7 support assistance

    Ask us a question anytime you need to—we don’t charge extra for supporting you!

Calculate how much your essay costs

Type of paper
Academic level
Deadline
550 words

How to place an order

  • Choose the number of pages, your academic level, and deadline
  • Push the orange button
  • Give instructions for your paper
  • Pay with PayPal or a credit card
  • Track the progress of your order
  • Approve and enjoy your custom paper

Ask experts to write you a cheap essay of excellent quality

Place an order