Reference no: EM132158969
Use MiniIDE and Wookie to do the following assignment:
Modify the "Example1.asm" program as follows. (Example1.asm is the example that copies a string from one place to another.)
First, replace the text string "Hello!" with the last 6 digits of your student ID number.
If your ID number is J00123456, replace "STRING1 DC.B "Hello!",$00" with "STRING1 DC.B $01,$02,$03,$04,$05,$06,$00".
If your ID number contains a 0, replace the 0 in the ID number with $0A. So if your ID number is J00120034, the string should read "STRING1 DC.B $01,$02,$0A,$0A,$04,$05,$00"
Second, rename the byte labeled "LEN" to "SUM."
Third, change the program so that, instead of copying the string, it adds up the string. So if your ID number is J00123456, you will wind up doing 1+2+3+4+5+6, and if your ID number is J00120034, you will wind up doing 1+2+10+10+3+4.
This generally means that you need to clear one of the accumulators (A or B) and then add each string element to it. Just like the original example, the program should stop adding when it reads a 0 (which is why you need to replace the 0 in your ID number with A.)
Fourth, change the program so that it writes the sum (the final answer after adding it all up) to the variable (label) named SUM.
Note that you do not need the Y register to do this assignment.
For full credit, you need to do the following:
Turn in printouts of the ".asm" and ".lst" files. (Please no tree-killing .S19 files!)
Turn in a screen capture of Wooike showing the MC68HC11 CPU window (the one labeled MCU) and the Browse Mem window (the one labeled Memory).
The Browse Mem window needs to show both STRING1 and SUM. The screen capture needs to be readable!