OpenCores
URL https://opencores.org/ocsvn/next186_soc_pc/next186_soc_pc/trunk

Subversion Repositories next186_soc_pc

[/] [next186_soc_pc/] [trunk/] [SW/] [bootload_BIOS_SD/] [bootstrap_print.txt] - Rev 3

Compare with Previous | Blame | View Log

// 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);
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.