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

Subversion Repositories 1664

[/] [1664/] [trunk/] [c/] [cpu_1664/] [cpu_1664_dev_opera_parametre_funsiona__3e3e2e.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
 
3
struct lista * cpu_1664_dev_opera_parametre_funsiona__3e3e2e(struct cpu_1664 * cpu, n1 bait)
4
{
5
 
6
 char opera_eor[]={"eor"};
7
 char opera_and[]={"and"};
8
 char opera_or[]={"or"};
9
 char opera_cam[]={"cam"};
10
 char *opera[4]={opera_eor,opera_and,opera_or,opera_cam};
11
 
12
 struct lista *lista_2=lista_nova(0);
13
 struct lista *lista_parametre=lista_nova(0);
14
 struct lista *lista_informa=lista_nova(0);
15
 
16
 n1 A=bait&0x07;;
17
 n1 B=(bait>>3)&0x07;;
18
 n1 C=bait>>6;
19
 
20
 lista_ajunta_asciiexadesimal__n1(lista_parametre, A);
21
 lista_ajunta__dato(lista_parametre, ' ');
22
 lista_ajunta_asciiexadesimal__n1(lista_parametre, B);
23
 lista_ajunta__dato(lista_parametre, ' ');
24
 lista_ajunta_asciiexadesimal__n1(lista_parametre, C);
25
 
26
 if(C<3)
27
 {
28
  lista_ajunta__dato(lista_informa, (cpu->depende[A]!=0)|'0');
29
  lista_ajunta__dato(lista_informa, ' ');
30
  lista_ajunta__ccadena(lista_informa, opera[C]);
31
  lista_ajunta__dato(lista_informa, ' ');
32
  lista_ajunta__dato(lista_informa, (cpu->depende[B]!=0)|'0');
33
 }
34
 else
35
 {
36
 lista_ajunta__dato(lista_informa, (cpu->depende[A]!=0)|'0');
37
 lista_ajunta__ccadena(lista_informa, " -> <- ");
38
 lista_ajunta__dato(lista_informa, (cpu->depende[B]!=0)|'0');
39
 }
40
 
41
 lista_ajunta__P(lista_2, (P)lista_parametre);
42
 lista_ajunta__P(lista_2, (P)lista_informa);
43
 return lista_2;
44
}

powered by: WebSVN 2.1.0

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