Copy the file ~reese/EE4713/copy_test.s to your local directory. You can
execute this file in dlxsim by doing:
% dlxsim
(dlxsim) load copy_test.s
(dlxsim) go _main
(dlxsim) quit
Execute it and see what it does.
The '_main' function prints out two strings, 'string1' and 'string2'
before and after the 'bcopy (byte-copy) subroutine . The 'bcopy' routine
is called with the starting address of 'string1' in register 'r2', and the
starting address of 'string2' in register 'r3'.
You are to modify the 'bcopy' subroutine so that 'string1' is copied over
'string2'. You can tell when you have reached the end of 'string1' because it will
have a byte value equal to zero. You can look at problem 3.8 in the textbook
for a hint on how to write 'bcopy' but beware: this problem has some errors
in it and it copies WORDS, not BYTES.
To Hand In
Send your modified 'copy_test.s' file to me via email. BE SURE that you
have put your NAME and SSN as comments in the file; also comment your subroutine
so that I know what is going on.