myprintf: removed unused variables
added missing volatile modifiers