Use write_uint16_t and write_char_string helpers

Use write_uint16_t and write_char_string helpers in the write_obj
function.

Reorder existing helpers to group by io direction
Regurgitate as hex
Give the object file some magic :3