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] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 ndumitrach
// utility for printing the boot code in hex format for XILINX .coe file
2
 
3
include "sys.h"
4
define N 16
5
 
6
int buf[1024];
7
int main()
8
{
9
        int f = fopen("e:/bootstrap.com", "rb");
10
        fseek(f, 256, 0);
11
        int sz = fread(&buf, 1, sizeof(&buf), f) >> 2;
12
        int j, i; while(i
13
        {
14
                printf("%08x, ", buf[i]);
15
                i=i+1;
16
                if(!(i&(N-1))) putchar('\xa');
17
        }
18
        fclose(f);
19
}

powered by: WebSVN 2.1.0

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