#include #include #include void main(const char *path) { struct file *f = open_file(path); if (!f) { tell_user_sz("Couldn't open file.\n"); return; } char buf[] = { ' ', '\0', '\0', '\0' }; uint8_t v; uint32_t a = 0; while (read_from_file(f, 1, &v)) { if (!(a & 0xf)) { char buf2[] = {'0', 'x', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0' }; itosz_h32(a, buf2 + 2); tell_user_sz(buf2); tell_user_sz(" |"); } itosz_h8(v, buf + 1); tell_user_sz(buf); if (!(++a & 0xf)) tell_user_sz("\n"); } tell_user_sz("\n"); close_file(f); }