// utility for printing the boot code in hex format

include "sys.h"
define N 8

byte buf[2048];
int main()
{
	int f = fopen("E:/Work/Lattice/Ohm/USB2PS2/8080code/firmware.bin", "rb");
	int sz = fread(&buf, 1, sizeof(&buf), f); 
	int j, i; while(i<sizeof(&buf))
	{
		printf("%02x\x9", buf[i]);
		i=i+1;
		if(!(i&(N-1))) putchar('\xd\xa');
	}
	fclose(f);
}