// utility for printing the boot code in hex format for XILINX .coe file

include "sys.h"
define N 16

int buf[1024];
int main()
{
	int f = fopen("e:/bootstrap.com", "rb");
	fseek(f, 256, 0);
	int sz = fread(&buf, 1, sizeof(&buf), f) >> 2; 
	int j, i; while(i<sz)
	{
		printf("%08x, ", buf[i]);
		i=i+1;
		if(!(i&(N-1))) putchar('\xa');
	}
	fclose(f);
}