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

Subversion Repositories openrisc_me

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

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

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

powered by: WebSVN 2.1.0

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