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

Subversion Repositories or1k

[/] [or1k/] [branches/] [newlib/] [newlib/] [libgloss/] [mn10300/] [test.c] - Blame information for rev 1766

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

Line No. Rev Author Line
1 39 lampret
#include <stdio.h>
2
 
3
static void
4
send_msg1 (void)
5
{
6
  static char msg[] = "Hello World\r\n";
7
  write(1, msg, strlen (msg));
8
}
9
 
10
static void
11
send_msg2 (void)
12
{
13
  static char msg[] = "Goodnight Irene\r\n";
14
  write(1, msg, strlen (msg));
15
}
16
 
17
static void
18
delay (void)
19
{
20
  int i;
21
 
22
  for (i = 0; i < 1000000; i++)
23
    ;
24
}
25
 
26
int
27
main(int argc, char *argv[])
28
{
29
  int i, j;
30
  for (i = 0; i < 10; i++)
31
    {
32
      send_msg1 ();
33
      delay ();
34
      send_msg2 ();
35
    }
36
  return 0;
37
}
38
 
39
 

powered by: WebSVN 2.1.0

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