Clean up counter related code
Rename hello.c to test_semihost.c
Add error checking for open files and minor readable improvement
Add test_semihost.c to depend file in Makefile