Add function to print printable hex chars

Print printable chars also on last line and add a function s.t. this printing mechanism can be re-used