Prepare a MARIE subroutine called printStringName that can print any name containing two ASCII ‘0’ terminated strings (using the “Output” instruction). Start by using a label “PrintName” that holds the start address of a name string (like, myNameAdd in the example above). The code should then load a character from that address, output it if it is not ‘0’, then increment the address by one, and keep doing that until the character loaded from the address is a ‘0’ (which signals the end of the string). Then, print an ASCII “Space” character, and proceed to print the second part of the name string, i.e. Last Name until the character loaded from the address is a ‘0’ (which signals the end of the string). Then, when you load the second ASCII ‘0’ which marks the “end of a name”, print an ASCII “New Line” character and proceed to print the next name. For this task, you may use two or three names (your First Name and Last Name, your teacher’s name, your tutor’s name etc. minimum two names) to print, each name hard coded and assigned a label to identify.
JnS Print
Halt
Print, HEX 2
PrintString, LoadI PrintName
Skipcond 800
JumpI Print
Output
Clear
Load PrintName
Add Increment
Store PrintName
Clear
Jump PrintString
PrintName, DEC 0
HEX 043
HEX 048
HEX 045
HEX 041
HEX 048
HEX 030
HEX 030
HEX 030
Increment, DEC 1
Load PrintName
Store Print_Arg
JnS Print
Halt
PrintName, hex 04A
Print_Arg, DEC 0
Print, Hex 0
Load Print_Arg
Output
Skipcond 000
JumpI Print
Output
Clear
Load PrintName
Add Increment
Store PrintName
Clear
Jump 0
Increment, DEC 1
The code keeps on repeating and im not sure whats the problem