Question: / * * * * * / This is starting code for Project 2 for ECE 5 4 8 4 , Spring 2 0 1
This is starting code for Project for ECE Spring
Remove this header and identify your project name and your name.
ORG Start the program at location 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.
Here's an example of how subroutine ROT 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 ROT Jump to the ROT subroutine
Upon return, the transformed character is in AC
StoreI Ptr Store result in memory
Halt
Rotate subroutine: Apply ROT to input character in location InVal and return in AC
WARNING: This subroutine almost works. You need to fix a bug.
ROT HEX
Load InVal Get character
Add Val Add
Store Hold Save it
Subt ChZ Check if modulo adjust is needed past Z
Skipcond 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 ROT Return with result in AC
Constants the program should not write to these locations
ChA, HEX Constant value A for modulo adjust in subroutine
ChZ HEX A Constant value Z for modulo check in subroutine
ChPe, HEX E Constant period character that marks end of input
Val DEC Constant rotate value of for subroutine
One, HEX Constant value
Start, HEX Constant address for start of character block
Data area these locations are for reading and writing
InVal, HEX Reserved for subroutine input value
Hold, HEX Reserved for temporary variable for subroutine
Ptr HEX Reserved for character pointer
Summary:
Input phase
Input a character AZ or only
Apply the RotateROT transformation
to the character if AZ
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
Also note we are using marie sim v
Skipcond : Skips if AC
Skipcond : Skips if AC
Skipcond : Skips if AC
Please read the official instruction set before writing an answer because all your other answers on the whole website are wrong.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
