Question: Help with getting a MARIE Assembly Program to Run Properly: I have to create a MARIE Assembly Program that takes in a user's input, which

Help with getting a MARIE Assembly Program to Run Properly:

I have to create a MARIE Assembly Program that takes in a user's input, which the input phase is halted by a "." and rotates the ASCII characters of the user's input by 13 spaces and then outputs the shifted ASCII characters.

Need Help with:

1) So far I created the loop that can take in the input ASCII characters, but cannot seem to grab all the letters that were inputted, my code just grabs the "."

2) Need help with deciding which variable I need to Load before calling the ROT13 subroutine

3) Need help with verifying the ROT13 subroutine is working properly

4) Need help with verifying my output loop is printing the correct letters

ORG 100 / Start the program at location 100 hexadecimal

Load Start / Initialize character pointer to start of block UserI, Input Store Ptr Load Ptr Subt ChPe Skipcond 400 Jump UserI

LoadI Ptr / Put 'A' in AC Store InVal / Store value to be transformed into InVal Jns ROT13 Jump OCycle / Jump to the ROT13 subroutine / Upon return, the transformed character is in AC 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 Jump Done / Result is in AC

NoAdj, Load Hold Store Ptr

Done, JumpI ROT13 / Return with result in AC

OCycle, LoadI Ptr Store Ptr Subt ChPe Skipcond 400 Jump Cont

Cont, Load Ptr Output Load Ptr Add One Store Ptr Jump OCycle Halt / ----- / 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!