#! /usr/bin/perl

# binary data -> assembly for FLASH
binmode STDIN;


printf(".DEVICE ATmega103\n");
printf(".CSEG\n");
#printf(".ORG 0x8000\n");
printf("__mp3_flash_addr:\n");

while (1) {
  $len = read(STDIN, $data, 2);
  last if $len < 1;
  @array = unpack("C$len", $data);
  printf ".DW 0x%02X%02X\n", $array[0], $array[1];
}



