SlideShare a Scribd company logo
1 of 11
Project 2 MARIE Start code at bottom of document1.
Introduction
The objective of this project is to reinforce your understanding
of computer organization, instruction set architectures, and
assembly language. You will accomplish this by writing,
analyzing, and debugging an assembly language program for the
MARIE processor.
You must: (i) design and write an assembly language program
for the MARIE processor that inputs, transforms, stores, and
then outputs a sequence of characters from the set A-Z; (ii)
debug and test your program by simulating it using the MARIE
simulator; (iii) document your work in a short report; and (iv)
submit the report file (*.pdf), assembler source file (*.mas),
assembler listing file (*.lst), and assembler executable file
(*.mex).
2. The MARIE Simulator
The MARIE simulator is provided as a zip file containing Java
archives (*.jar) files, documentation, and example source files.
Unzip the file to a directory for use. Do the following to
become familiar with the MARIE simulator
3. Design Specification
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.4. Testing
Test and debug the program using the MARIE simulator
(MarieSim.jar). Debug the program using the “Step” and
“Breakpoint” features of the simulator. You must test your
program with the following two test cases.
Test 1: Input the eight-character sequence “VIRGINIA”
followed by a ‘.’ to terminate the input. Note that you need to
input one character at a time into MarieSim’s ASCII Input area,
with each character followed by pressing the “Enter” key. 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 four-character sequence “GRPU” followed by a ‘.’ To
terminate the input. Note the output.
When you create your source file within MarieSim (using the
File > Edit menu pick), use file name
lastname_firstname_P2.mas, where “lastname” is your last or
family name and “firstname” is your first or given name. You
can assemble your source file in the editor program. The
assembly process creates a listing file
(lastname_firstname_P2.lst) and an executable file
(lastname_firstname_P2.mex). Load the executables file into the
simulator for execution.
5. Design Notes5.1. he ROT13 Cipher
The ROT13 cipher (see http://en.wikipedia.org/wiki/ROT13) is
an old, but trivial cipher that simply rotates the characters by 13
positions. For example, ‘A’ is transformed to ‘N’ and ‘Z’ is
transformed to ‘M’.
The Project-2_Start.mas source file includes a ROT13
subroutine that almost performs this transformation. You need
to fix one bug in the subroutine.
/ *****
/ This is starting code for Project 2 for ECE 5484, Fall 2016
/ Remove this header and identify your project name and your
name.
/ *****
ORG
100
/ Start the program at location 100 hexadecimal
/ -----
/ Input characters, transform, and store in memory until '.' is
input
/ -----
Load
Start
/ Initialize character pointer to start of block
Store
Ptr
/>>>>> Add code to accomplish the input and output phases.
<<<<<
Input
InVal
/>>>>> Here's an example of how subroutine ROT13 is called.
<<<<<
/>>>>> We'll just transform 'A' in this example then halt.
<<<<<
Load
ChA
/ Put 'A' in AC
Store
InVal
/ Store value to be transformed into InVal
Jns
ROT13
/ Jump to the ROT13 subroutine
/ Upon return, the transformed character is in AC
Halt
/ -----
/ Rotate-13 subroutine: Apply ROT13 to input character in
location InVal and return in AC
/ -----
/>>>>> WARNING: This subroutine *almost* works. You
need to fix a bug.
ROT13,
HEX
0
Load
InVal
/ Get character
Add
Val13
/ Add 13
Store
Hold
/ Save it
Subt
ChZ
/ Check if modulo adjust is needed (past 'Z')
Skipcond
800
/ No adjust needed if past 'Z'
Jump
NoAdj
Add
ChA
/ Add 'A' back to difference to perform modulo
Jump
Done
/ Result is in AC
NoAdj,
Load
Hold
/ No adjust needed, get result
Done,
JumpI
ROT13
/ Return with result in AC
/ -----
/ Constants (the program should not write to these locations)
/ -----
ChA,
HEX
0041
/ Constant value 'A' for modulo adjust in subroutine
ChZ,
HEX
005A
/ Constant value 'Z' for modulo check in subroutine
ChPe,
HEX
2E
/ Constant period character that marks end of input
Val13,
DEC
13
/ Constant rotate value of 13 for subroutine
One,
HEX
1
/ Constant value 1
Start,
HEX
200
/ Constant address for start of character block
/ -----
/ Data area (these locations are for reading and writing)
/ -----
InVal,
HEX
0
/ Reserved for subroutine input value
Hold,
HEX
0
/ Reserved for temporary variable for subroutine
Ptr,
HEX
0
/ Reserved for character pointer

More Related Content

What's hot

Elicottero - Meccanica e Prestazioni.pdf
Elicottero - Meccanica e Prestazioni.pdfElicottero - Meccanica e Prestazioni.pdf
Elicottero - Meccanica e Prestazioni.pdfSergio Solofria
 
Environmental chemistry
Environmental chemistryEnvironmental chemistry
Environmental chemistrynaziarubab
 
Radon Presentation
Radon PresentationRadon Presentation
Radon PresentationTom_Yeager
 
Use case diagram
Use case diagramUse case diagram
Use case diagramRaz Friman
 
Bobcat 371 skid steer loader service repair manual instant download
Bobcat 371 skid steer loader service repair manual instant downloadBobcat 371 skid steer loader service repair manual instant download
Bobcat 371 skid steer loader service repair manual instant downloadudfujsjkkksemm
 
I-Tier: Breaking Up the Monolith @ Philly ETE
I-Tier: Breaking Up the Monolith @ Philly ETEI-Tier: Breaking Up the Monolith @ Philly ETE
I-Tier: Breaking Up the Monolith @ Philly ETESean McCullough
 
O Mítico Homem-Mês
O Mítico Homem-MêsO Mítico Homem-Mês
O Mítico Homem-MêsJuliane Silva
 
O segredo de pedir desculpas
O segredo de pedir desculpasO segredo de pedir desculpas
O segredo de pedir desculpasFreekidstories
 
evolution of operating system
evolution of operating systemevolution of operating system
evolution of operating systemAmir Khan
 
Baldrige Feedback Report 2022 Observations รายงานป้อนกลับรูปแบบใหม่.pptx
Baldrige Feedback Report 2022 Observations รายงานป้อนกลับรูปแบบใหม่.pptxBaldrige Feedback Report 2022 Observations รายงานป้อนกลับรูปแบบใหม่.pptx
Baldrige Feedback Report 2022 Observations รายงานป้อนกลับรูปแบบใหม่.pptxmaruay songtanin
 
Mercuri Studie - KPIs – Steuerung und Messung von Leistung im Vertrieb
Mercuri Studie - KPIs – Steuerung und Messung von Leistung im VertriebMercuri Studie - KPIs – Steuerung und Messung von Leistung im Vertrieb
Mercuri Studie - KPIs – Steuerung und Messung von Leistung im VertriebChristian Peters
 

What's hot (16)

Elicottero - Meccanica e Prestazioni.pdf
Elicottero - Meccanica e Prestazioni.pdfElicottero - Meccanica e Prestazioni.pdf
Elicottero - Meccanica e Prestazioni.pdf
 
Environmental chemistry
Environmental chemistryEnvironmental chemistry
Environmental chemistry
 
Radon Presentation
Radon PresentationRadon Presentation
Radon Presentation
 
Use case diagram
Use case diagramUse case diagram
Use case diagram
 
Bobcat 371 skid steer loader service repair manual instant download
Bobcat 371 skid steer loader service repair manual instant downloadBobcat 371 skid steer loader service repair manual instant download
Bobcat 371 skid steer loader service repair manual instant download
 
I-Tier: Breaking Up the Monolith @ Philly ETE
I-Tier: Breaking Up the Monolith @ Philly ETEI-Tier: Breaking Up the Monolith @ Philly ETE
I-Tier: Breaking Up the Monolith @ Philly ETE
 
O Mítico Homem-Mês
O Mítico Homem-MêsO Mítico Homem-Mês
O Mítico Homem-Mês
 
Davranişlarimiz nasil oluşur
Davranişlarimiz nasil oluşurDavranişlarimiz nasil oluşur
Davranişlarimiz nasil oluşur
 
O segredo de pedir desculpas
O segredo de pedir desculpasO segredo de pedir desculpas
O segredo de pedir desculpas
 
evolution of operating system
evolution of operating systemevolution of operating system
evolution of operating system
 
Ford 3600.pdf
Ford 3600.pdfFord 3600.pdf
Ford 3600.pdf
 
ABB Laser Analyzers-r1
ABB Laser Analyzers-r1ABB Laser Analyzers-r1
ABB Laser Analyzers-r1
 
ICP MS
ICP MSICP MS
ICP MS
 
Baldrige Feedback Report 2022 Observations รายงานป้อนกลับรูปแบบใหม่.pptx
Baldrige Feedback Report 2022 Observations รายงานป้อนกลับรูปแบบใหม่.pptxBaldrige Feedback Report 2022 Observations รายงานป้อนกลับรูปแบบใหม่.pptx
Baldrige Feedback Report 2022 Observations รายงานป้อนกลับรูปแบบใหม่.pptx
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
 
Mercuri Studie - KPIs – Steuerung und Messung von Leistung im Vertrieb
Mercuri Studie - KPIs – Steuerung und Messung von Leistung im VertriebMercuri Studie - KPIs – Steuerung und Messung von Leistung im Vertrieb
Mercuri Studie - KPIs – Steuerung und Messung von Leistung im Vertrieb
 

Similar to MARIE Assembly Program Transforms and Outputs ROT13 Encrypted Characters

Complete C programming Language Course
Complete C programming Language CourseComplete C programming Language Course
Complete C programming Language CourseVivek chan
 
C programming language tutorial
C programming language tutorial C programming language tutorial
C programming language tutorial javaTpoint s
 
Microprocessor chapter 9 - assembly language programming
Microprocessor  chapter 9 - assembly language programmingMicroprocessor  chapter 9 - assembly language programming
Microprocessor chapter 9 - assembly language programmingWondeson Emeye
 
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxCS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxfaithxdunce63732
 
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...RSathyaPriyaCSEKIOT
 
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part II
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part IIIntro To C++ - Class 03 - An Introduction To C++ Programming, Part II
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part IIBlue Elephant Consulting
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointJavaTpoint.Com
 
data.txtInternational Business Management l2 Cons.docx
data.txtInternational Business Management       l2        Cons.docxdata.txtInternational Business Management       l2        Cons.docx
data.txtInternational Business Management l2 Cons.docxtheodorelove43763
 
C++ programming language basic to advance level
C++ programming language basic to advance levelC++ programming language basic to advance level
C++ programming language basic to advance levelsajjad ali khan
 
The ProblemUsing C programming language write a program that simul.pdf
The ProblemUsing C programming language write a program that simul.pdfThe ProblemUsing C programming language write a program that simul.pdf
The ProblemUsing C programming language write a program that simul.pdffederaleyecare
 
Complete c programming presentation
Complete c programming presentationComplete c programming presentation
Complete c programming presentationnadim akber
 

Similar to MARIE Assembly Program Transforms and Outputs ROT13 Encrypted Characters (20)

UNIT-II CP DOC.docx
UNIT-II CP DOC.docxUNIT-II CP DOC.docx
UNIT-II CP DOC.docx
 
Mp lab manual
Mp lab manualMp lab manual
Mp lab manual
 
Complete C programming Language Course
Complete C programming Language CourseComplete C programming Language Course
Complete C programming Language Course
 
C programming language tutorial
C programming language tutorial C programming language tutorial
C programming language tutorial
 
keyword
keywordkeyword
keyword
 
keyword
keywordkeyword
keyword
 
Microprocessor chapter 9 - assembly language programming
Microprocessor  chapter 9 - assembly language programmingMicroprocessor  chapter 9 - assembly language programming
Microprocessor chapter 9 - assembly language programming
 
C notes.pdf
C notes.pdfC notes.pdf
C notes.pdf
 
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxCS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
 
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
 
Intro To C++ - Class 3 - Sample Program
Intro To C++ - Class 3 - Sample ProgramIntro To C++ - Class 3 - Sample Program
Intro To C++ - Class 3 - Sample Program
 
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part II
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part IIIntro To C++ - Class 03 - An Introduction To C++ Programming, Part II
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part II
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpoint
 
data.txtInternational Business Management l2 Cons.docx
data.txtInternational Business Management       l2        Cons.docxdata.txtInternational Business Management       l2        Cons.docx
data.txtInternational Business Management l2 Cons.docx
 
C programming
C programmingC programming
C programming
 
C++ programming language basic to advance level
C++ programming language basic to advance levelC++ programming language basic to advance level
C++ programming language basic to advance level
 
CP Handout#2
CP Handout#2CP Handout#2
CP Handout#2
 
The ProblemUsing C programming language write a program that simul.pdf
The ProblemUsing C programming language write a program that simul.pdfThe ProblemUsing C programming language write a program that simul.pdf
The ProblemUsing C programming language write a program that simul.pdf
 
Complete c programming presentation
Complete c programming presentationComplete c programming presentation
Complete c programming presentation
 
Embedded C programming session10
Embedded C programming  session10Embedded C programming  session10
Embedded C programming session10
 

More from briancrawford30935

You have collected the following documents (unstructured) and pl.docx
You have collected the following documents (unstructured) and pl.docxYou have collected the following documents (unstructured) and pl.docx
You have collected the following documents (unstructured) and pl.docxbriancrawford30935
 
You have been working as a technology associate the information .docx
You have been working as a technology associate the information .docxYou have been working as a technology associate the information .docx
You have been working as a technology associate the information .docxbriancrawford30935
 
You have chosen to join WHO. They are particularly interested in.docx
You have chosen to join WHO. They are particularly interested in.docxYou have chosen to join WHO. They are particularly interested in.docx
You have chosen to join WHO. They are particularly interested in.docxbriancrawford30935
 
You have been tasked to present at a town hall meeting in your local.docx
You have been tasked to present at a town hall meeting in your local.docxYou have been tasked to present at a town hall meeting in your local.docx
You have been tasked to present at a town hall meeting in your local.docxbriancrawford30935
 
You have been tasked as the health care administrator of a major hos.docx
You have been tasked as the health care administrator of a major hos.docxYou have been tasked as the health care administrator of a major hos.docx
You have been tasked as the health care administrator of a major hos.docxbriancrawford30935
 
You have been tasked to devise a program to address the needs of.docx
You have been tasked to devise a program to address the needs of.docxYou have been tasked to devise a program to address the needs of.docx
You have been tasked to devise a program to address the needs of.docxbriancrawford30935
 
You have been successful in your application for the position be.docx
You have been successful in your application for the position be.docxYou have been successful in your application for the position be.docx
You have been successful in your application for the position be.docxbriancrawford30935
 
You have been hired as a project management consultant by compan.docx
You have been hired as a project management consultant by compan.docxYou have been hired as a project management consultant by compan.docx
You have been hired as a project management consultant by compan.docxbriancrawford30935
 
You have been hired to manage a particular aspect of the new ad.docx
You have been hired to manage a particular aspect of the new ad.docxYou have been hired to manage a particular aspect of the new ad.docx
You have been hired to manage a particular aspect of the new ad.docxbriancrawford30935
 
You have been hired by Red Didgeridoo Technologies. They know th.docx
You have been hired by Red Didgeridoo Technologies. They know th.docxYou have been hired by Red Didgeridoo Technologies. They know th.docx
You have been hired by Red Didgeridoo Technologies. They know th.docxbriancrawford30935
 
You have been hired by TMI to design an application using shell scri.docx
You have been hired by TMI to design an application using shell scri.docxYou have been hired by TMI to design an application using shell scri.docx
You have been hired by TMI to design an application using shell scri.docxbriancrawford30935
 
You have been hired as the CSO (Chief Security Officer) for an org.docx
You have been hired as the CSO (Chief Security Officer) for an org.docxYou have been hired as the CSO (Chief Security Officer) for an org.docx
You have been hired as the CSO (Chief Security Officer) for an org.docxbriancrawford30935
 
You have been hired to evaluate the volcanic hazards associated .docx
You have been hired to evaluate the volcanic hazards associated .docxYou have been hired to evaluate the volcanic hazards associated .docx
You have been hired to evaluate the volcanic hazards associated .docxbriancrawford30935
 
You have been hired as an assistant to the public health officer for.docx
You have been hired as an assistant to the public health officer for.docxYou have been hired as an assistant to the public health officer for.docx
You have been hired as an assistant to the public health officer for.docxbriancrawford30935
 
You have been engaged to develop a special calculator program. T.docx
You have been engaged to develop a special calculator program. T.docxYou have been engaged to develop a special calculator program. T.docx
You have been engaged to develop a special calculator program. T.docxbriancrawford30935
 
You have now delivered the project to your customer ahead of schedul.docx
You have now delivered the project to your customer ahead of schedul.docxYou have now delivered the project to your customer ahead of schedul.docx
You have now delivered the project to your customer ahead of schedul.docxbriancrawford30935
 
You have now delivered the project to your customer. The project was.docx
You have now delivered the project to your customer. The project was.docxYou have now delivered the project to your customer. The project was.docx
You have now delivered the project to your customer. The project was.docxbriancrawford30935
 
You have now experienced the work of various scholars, artists and m.docx
You have now experienced the work of various scholars, artists and m.docxYou have now experienced the work of various scholars, artists and m.docx
You have now experienced the work of various scholars, artists and m.docxbriancrawford30935
 
You have learned that Mr. Moore does not drink alcohol in the mornin.docx
You have learned that Mr. Moore does not drink alcohol in the mornin.docxYou have learned that Mr. Moore does not drink alcohol in the mornin.docx
You have learned that Mr. Moore does not drink alcohol in the mornin.docxbriancrawford30935
 
You have been hired by a large hospitality firm (e.g., Marriot.docx
You have been hired by a large hospitality firm (e.g., Marriot.docxYou have been hired by a large hospitality firm (e.g., Marriot.docx
You have been hired by a large hospitality firm (e.g., Marriot.docxbriancrawford30935
 

More from briancrawford30935 (20)

You have collected the following documents (unstructured) and pl.docx
You have collected the following documents (unstructured) and pl.docxYou have collected the following documents (unstructured) and pl.docx
You have collected the following documents (unstructured) and pl.docx
 
You have been working as a technology associate the information .docx
You have been working as a technology associate the information .docxYou have been working as a technology associate the information .docx
You have been working as a technology associate the information .docx
 
You have chosen to join WHO. They are particularly interested in.docx
You have chosen to join WHO. They are particularly interested in.docxYou have chosen to join WHO. They are particularly interested in.docx
You have chosen to join WHO. They are particularly interested in.docx
 
You have been tasked to present at a town hall meeting in your local.docx
You have been tasked to present at a town hall meeting in your local.docxYou have been tasked to present at a town hall meeting in your local.docx
You have been tasked to present at a town hall meeting in your local.docx
 
You have been tasked as the health care administrator of a major hos.docx
You have been tasked as the health care administrator of a major hos.docxYou have been tasked as the health care administrator of a major hos.docx
You have been tasked as the health care administrator of a major hos.docx
 
You have been tasked to devise a program to address the needs of.docx
You have been tasked to devise a program to address the needs of.docxYou have been tasked to devise a program to address the needs of.docx
You have been tasked to devise a program to address the needs of.docx
 
You have been successful in your application for the position be.docx
You have been successful in your application for the position be.docxYou have been successful in your application for the position be.docx
You have been successful in your application for the position be.docx
 
You have been hired as a project management consultant by compan.docx
You have been hired as a project management consultant by compan.docxYou have been hired as a project management consultant by compan.docx
You have been hired as a project management consultant by compan.docx
 
You have been hired to manage a particular aspect of the new ad.docx
You have been hired to manage a particular aspect of the new ad.docxYou have been hired to manage a particular aspect of the new ad.docx
You have been hired to manage a particular aspect of the new ad.docx
 
You have been hired by Red Didgeridoo Technologies. They know th.docx
You have been hired by Red Didgeridoo Technologies. They know th.docxYou have been hired by Red Didgeridoo Technologies. They know th.docx
You have been hired by Red Didgeridoo Technologies. They know th.docx
 
You have been hired by TMI to design an application using shell scri.docx
You have been hired by TMI to design an application using shell scri.docxYou have been hired by TMI to design an application using shell scri.docx
You have been hired by TMI to design an application using shell scri.docx
 
You have been hired as the CSO (Chief Security Officer) for an org.docx
You have been hired as the CSO (Chief Security Officer) for an org.docxYou have been hired as the CSO (Chief Security Officer) for an org.docx
You have been hired as the CSO (Chief Security Officer) for an org.docx
 
You have been hired to evaluate the volcanic hazards associated .docx
You have been hired to evaluate the volcanic hazards associated .docxYou have been hired to evaluate the volcanic hazards associated .docx
You have been hired to evaluate the volcanic hazards associated .docx
 
You have been hired as an assistant to the public health officer for.docx
You have been hired as an assistant to the public health officer for.docxYou have been hired as an assistant to the public health officer for.docx
You have been hired as an assistant to the public health officer for.docx
 
You have been engaged to develop a special calculator program. T.docx
You have been engaged to develop a special calculator program. T.docxYou have been engaged to develop a special calculator program. T.docx
You have been engaged to develop a special calculator program. T.docx
 
You have now delivered the project to your customer ahead of schedul.docx
You have now delivered the project to your customer ahead of schedul.docxYou have now delivered the project to your customer ahead of schedul.docx
You have now delivered the project to your customer ahead of schedul.docx
 
You have now delivered the project to your customer. The project was.docx
You have now delivered the project to your customer. The project was.docxYou have now delivered the project to your customer. The project was.docx
You have now delivered the project to your customer. The project was.docx
 
You have now experienced the work of various scholars, artists and m.docx
You have now experienced the work of various scholars, artists and m.docxYou have now experienced the work of various scholars, artists and m.docx
You have now experienced the work of various scholars, artists and m.docx
 
You have learned that Mr. Moore does not drink alcohol in the mornin.docx
You have learned that Mr. Moore does not drink alcohol in the mornin.docxYou have learned that Mr. Moore does not drink alcohol in the mornin.docx
You have learned that Mr. Moore does not drink alcohol in the mornin.docx
 
You have been hired by a large hospitality firm (e.g., Marriot.docx
You have been hired by a large hospitality firm (e.g., Marriot.docxYou have been hired by a large hospitality firm (e.g., Marriot.docx
You have been hired by a large hospitality firm (e.g., Marriot.docx
 

Recently uploaded

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 

Recently uploaded (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 

MARIE Assembly Program Transforms and Outputs ROT13 Encrypted Characters

  • 1. Project 2 MARIE Start code at bottom of document1. Introduction The objective of this project is to reinforce your understanding of computer organization, instruction set architectures, and assembly language. You will accomplish this by writing, analyzing, and debugging an assembly language program for the MARIE processor. You must: (i) design and write an assembly language program for the MARIE processor that inputs, transforms, stores, and then outputs a sequence of characters from the set A-Z; (ii) debug and test your program by simulating it using the MARIE simulator; (iii) document your work in a short report; and (iv) submit the report file (*.pdf), assembler source file (*.mas), assembler listing file (*.lst), and assembler executable file (*.mex). 2. The MARIE Simulator The MARIE simulator is provided as a zip file containing Java archives (*.jar) files, documentation, and example source files. Unzip the file to a directory for use. Do the following to become familiar with the MARIE simulator 3. Design Specification 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
  • 2. 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.
  • 3. 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.4. Testing Test and debug the program using the MARIE simulator (MarieSim.jar). Debug the program using the “Step” and “Breakpoint” features of the simulator. You must test your
  • 4. program with the following two test cases. Test 1: Input the eight-character sequence “VIRGINIA” followed by a ‘.’ to terminate the input. Note that you need to input one character at a time into MarieSim’s ASCII Input area, with each character followed by pressing the “Enter” key. 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 four-character sequence “GRPU” followed by a ‘.’ To terminate the input. Note the output. When you create your source file within MarieSim (using the File > Edit menu pick), use file name lastname_firstname_P2.mas, where “lastname” is your last or family name and “firstname” is your first or given name. You can assemble your source file in the editor program. The assembly process creates a listing file (lastname_firstname_P2.lst) and an executable file (lastname_firstname_P2.mex). Load the executables file into the simulator for execution. 5. Design Notes5.1. he ROT13 Cipher The ROT13 cipher (see http://en.wikipedia.org/wiki/ROT13) is an old, but trivial cipher that simply rotates the characters by 13 positions. For example, ‘A’ is transformed to ‘N’ and ‘Z’ is transformed to ‘M’. The Project-2_Start.mas source file includes a ROT13 subroutine that almost performs this transformation. You need to fix one bug in the subroutine. / ***** / This is starting code for Project 2 for ECE 5484, Fall 2016 / Remove this header and identify your project name and your name.
  • 5. / ***** ORG 100 / Start the program at location 100 hexadecimal / ----- / Input characters, transform, and store in memory until '.' is input / ----- Load Start / Initialize character pointer to start of block Store Ptr />>>>> Add code to accomplish the input and output phases. <<<<< Input InVal
  • 6. />>>>> Here's an example of how subroutine ROT13 is called. <<<<< />>>>> We'll just transform 'A' in this example then halt. <<<<< Load ChA / Put 'A' in AC Store InVal / Store value to be transformed into InVal Jns ROT13 / Jump to the ROT13 subroutine / Upon return, the transformed character is in AC
  • 7. Halt / ----- / Rotate-13 subroutine: Apply ROT13 to input character in location InVal and return in AC / ----- />>>>> WARNING: This subroutine *almost* works. You need to fix a bug. ROT13, HEX 0 Load InVal / Get character Add Val13 / Add 13 Store Hold
  • 8. / Save it Subt ChZ / Check if modulo adjust is needed (past 'Z') Skipcond 800 / No adjust needed if past 'Z' Jump NoAdj Add ChA / Add 'A' back to difference to perform modulo Jump Done / Result is in AC NoAdj, Load
  • 9. Hold / No adjust needed, get result Done, JumpI ROT13 / Return with result in AC / ----- / Constants (the program should not write to these locations) / ----- ChA, HEX 0041 / Constant value 'A' for modulo adjust in subroutine ChZ, HEX 005A / Constant value 'Z' for modulo check in subroutine ChPe, HEX 2E
  • 10. / Constant period character that marks end of input Val13, DEC 13 / Constant rotate value of 13 for subroutine One, HEX 1 / Constant value 1 Start, HEX 200 / Constant address for start of character block / ----- / Data area (these locations are for reading and writing) / ----- InVal, HEX 0 / Reserved for subroutine input value
  • 11. Hold, HEX 0 / Reserved for temporary variable for subroutine Ptr, HEX 0 / Reserved for character pointer