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

Subversion Repositories 1664

[/] [1664/] [trunk/] [c/] [cpu_1664/] [cpu_1664_asm.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mrdmkg
#include "cpu_1664.h"
2
#include <stdio.h>
3
 
4
int main(nN argc, n1 **argv)
5
{
6
 
7
 if (argc>2)
8
 {
9
  struct cpu_1664 *cpu=cpu_1664_nova(0);
10
  FILE *fix=fopen(argv[1], "wb");
11
  nN contador_ante=0;
12
 
13
  nN i;
14
  for(i=2;i<(argc);i++)
15
  {
16
   struct lista *lista_enflue=lista_nova__ccadena(".inclui ");
17
   lista_ajunta__ccadena(lista_enflue, argv[i]);
18
   cpu_1664_asm_ajunta__cadena(cpu, lista_enflue->datos, lista_enflue->contador);
19
   lista_libri(lista_enflue);
20
   printf("[0x%.*llx] %s\n",16,cpu->lista_imaje_asm->contador-contador_ante,argv[i]);
21
   contador_ante=cpu->lista_imaje_asm->contador;
22
  }
23
 
24
  printf("[0x%.*llx] %s\n",16,cpu->lista_imaje_asm->contador,argv[1]);
25
  fwrite(cpu->lista_imaje_asm->datos, 1, cpu->lista_imaje_asm->contador, fix);
26
  fclose(fix);
27
  cpu_1664_libri(cpu);
28
  return 0;
29
 }
30
 else
31
 {
32
  printf("asm_1664 lista_enflue esflue\n");
33
  return 0;
34
 }
35
}

powered by: WebSVN 2.1.0

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