12345678910111213141516171819202122232425262728293031323334353637383940 |
- #include <stddef.h>
- #include <stdint.h>
- #define IODEVB(d,r) (*(volatile uint8_t *)(0xfffffc00+((d) << 6)+((r) << 2)))
- #define LED IODEVB(0,0)
- #define CONSOLE IODEVB(1,0)
- void die(void)
- {
- while (1)
- ;
- }
- void _start(void)
- {
- static const char hello[] = "Hello, World!\r\n";
- const char *p;
- uint8_t led = 0;
- while ( 1 )
- LED = led++;
- #if 0
- LED = led = 0;
- for (p = hello; *p; p++)
- CONSOLE = *p;
- while ( 1 ) {
- for (int x = 0; x < 1000000; x++)
- /* nothing */;
- LED = ++led;
- }
- #endif
-
- die();
- }
|