URL
https://opencores.org/ocsvn/zpu/zpu/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 95 |
Rev 96 |
/*
|
/*
|
* Small hello world example, does not use printf()
|
* Small hello world example, does not use printf()
|
*/
|
*/
|
#include <stdio.h>
|
#include <stdio.h>
|
|
|
int j;
|
int j;
|
int k;
|
int k;
|
|
|
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
{
|
{
|
int i;
|
int i;
|
for (i=0; i< 10; i++)
|
for (i=0; i< 10; i++)
|
{
|
{
|
puts("Hello Xorld 1\n");
|
puts("Hello world 1\n");
|
puts("Hello Xorld 2\n");
|
puts("Hello world 2\n");
|
j=-4;
|
j=-4;
|
if ((j>>1)!=-2)
|
if ((j>>1)!=-2)
|
{
|
{
|
abort();
|
abort();
|
}
|
}
|
|
|
k=10;
|
k=10;
|
if (k*j!=-40)
|
if (k*j!=-40)
|
{
|
{
|
abort();
|
abort();
|
}
|
}
|
|
|
j=10;
|
j=10;
|
k=10000000;
|
k=10000000;
|
if (k*j!=100000000)
|
if (k*j!=100000000)
|
{
|
{
|
abort();
|
abort();
|
}
|
}
|
|
|
j=0x80000000;
|
j=0x80000000;
|
k=0xffffffff;
|
k=0xffffffff;
|
if (j>k)
|
if (j>k)
|
{
|
{
|
abort();
|
abort();
|
}
|
}
|
}
|
}
|
if (i!=10)
|
if (i!=10)
|
{
|
{
|
abort();
|
abort();
|
}
|
}
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.