re-arranged code so that the subroutine are doing most of the work, and main is just intializing values in the registers. Also changed program to use mainly R12,R13,R14 and R15