Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: First program
From: Björn Stenberg (bjorn_at_haxx.se)
Date: 2001-12-13


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 was last modified "Jan 10 2012" The Rockbox Crew
aaa