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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [stdalone/] [hello2/] [main.c] - Rev 149

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

/*
 * main.c -- main program
 */
 
 
void putchar(char c) {
  unsigned int *base;
 
  if (c == '\n') {
    putchar('\r');
  }
  base = (unsigned int *) 0xF0300000;
  while ((*(base + 2) & 1) == 0) ;
  *(base + 3) = c;
}
 
 
void puts(char *s) {
  char c;
 
  while ((c = *s++) != '\0') {
    putchar(c);
  }
}
 
 
void main(void) {
  puts("\nHello, world!\n\n");
}
 

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

powered by: WebSVN 2.1.0

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