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

First 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

Received on 2001-12-13

Page was last modified "Mon Nov 16 10:57:21 2020" The Rockbox Crew -- Privacy Policy