OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [libgloss/] [mn10300/] [test.c] - Blame information for rev 294

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

Line No. Rev Author Line
1 148 jeremybenn
#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.