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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [fpga/] [tests/] [test_100/] [hello/] [main.c] - Blame information for rev 295

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 295 hellwig
/*
2
 * main.c -- main program
3
 */
4
 
5
 
6
void putchar(char c) {
7
  unsigned int *base;
8
 
9
  if (c == '\n') {
10
    putchar('\r');
11
  }
12
  base = (unsigned int *) 0xF0300000;
13
  while ((*(base + 2) & 1) == 0) ;
14
  *(base + 3) = c;
15
}
16
 
17
 
18
void puts(char *s) {
19
  char c;
20
 
21
  while ((c = *s++) != '\0') {
22
    putchar(c);
23
  }
24
}
25
 
26
 
27
void main(void) {
28
  puts("\nHello, world!\n\n");
29
}

powered by: WebSVN 2.1.0

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