Added the test case to confirm the result.
Remove unused variable.
Refactoring: Calculate the address of buffer and get the contents from buffer with calculated address.
Unlooped address calculation function. It works.