|
Rockbox mail archiveSubject: First programFirst program
From: Björn Stenberg <bjorn_at_haxx.se>
Date: Thu, 13 Dec 2001 19:22:45 +0100 (CET) Gentlemen, It is with great pleasure I present to you my first program for the jukebox, the amazing 550-byte LED-flasher! Fun for the whole family! Copy the attached archos.mod to your jukebox and enjoy hours of entertainment! :-) Here's the source code: ------ #define PBDR (*((volatile short *)0x05FFFFC2)) int main(void) { while (1) { int i; PBDR ^= 0x40; /* toggle PB6 */ for (i=0; i<120000; i++); } } const void* vectors[] __attribute__ ((section (".vectors"))) = { main, /* Power-on reset */ 0, /* Power-on reset stack pointer */ main, /* Manual reset */ 0 /* Manual reset stack pointer */ }; ------ Amazingly complex, isn't it? ;) /Björn
Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |