summaryrefslogtreecommitdiffstats
path: root/zpu/hdl/zpu4/test/hello/hello.c
blob: 609c16313319508b07056a95d8f92db9ed3562e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * Small hello world example, does not use printf()
 */
#include <stdio.h>

int j;
int k;

int main(int argc, char **argv)
{
	int i;
  for (i=0; i< 10; i++)
    {
      puts("Hello world 1\n");
      puts("Hello world 2\n");
    j=-4;
    if ((j>>1)!=-2)
    {
    	abort();
    }
    
    k=10;
    if (k*j!=-40)
    {
    	abort();
    }
    
    j=10;
    k=10000000;
    if (k*j!=100000000)
    {
    	abort();
    }
    
    j=0x80000000;
    k=0xffffffff;
    if (j>k)
    {
    	abort();
    }
    }
    if (i!=10)
    {
    	abort();
    }
    
}
OpenPOWER on IntegriCloud