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

Subversion Repositories copyblaze

[/] [copyblaze/] [trunk/] [copyblaze/] [sw/] [code/] [pbcc/] [testM2/] [testM2.c] - Blame information for rev 70

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 54 ameziti
// test ruzne typy ukazatelu
2
 
3
int pole[] = {100,200,300,400};
4
char text[] = "Pepa";
5
int nepole = 6;
6
volatile int *vgptr;
7
int *gptr;
8
 
9
 
10
char fun( volatile char *a, int b, char c, char *d)
11
{
12
        volatile char val = 0;
13
        char t1 = *d;
14
 
15
        val = val * c;
16
        b = pole[3] & pole[1];
17
        text[2] = 'R';
18
        *d = text[3];
19
        return t1 + b + nepole;
20
}
21
 
22
void main()
23
{
24
        volatile char a = 10;
25
        volatile char b = 20;
26
        char c = 30;
27
        gptr = &nepole;
28
        vgptr = &nepole;
29
        pole[1] = 150;
30
        pole[0] = *gptr;
31
        *vgptr = 18;
32
        fun(&a,555,c, &c);
33
        nepole = c;
34
 
35
}

powered by: WebSVN 2.1.0

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