K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / lib / firmware / dsp56k /
server ip : 172.67.156.115

your ip : 172.70.80.236

H O M E


Filename/lib/firmware/dsp56k/concat-bootstrap.pl
Size996
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 09:50
Last modified05-Mar-2014 23:45
Last accessed06-Jul-2025 08:44
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
# Postprocessor for dsp56k bootstrap code.
#
# Copyright Ben Hutchings 2011.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

use strict;
use warnings;

my @memory;
my %symbol;

# Reconstruct memory image and symbol table
while (<>) {
if (/^P ([0-9A-F]{4}) ([0-9A-F]{6})\n/) {
$memory[hex($1)] = hex($2);
} elsif (/^I ([0-9A-F]{6}) (\w+)\n/) {
$symbol{$2} = hex($1);
} else {
print STDERR "W: did not recognise line $.\n";
}
}

# Concatenate first and second stage. Second stage is assembled
# between 'upload' and 'upload_end', but initially loaded at
# 'real' (end of the first stage).
for (0 .. ($symbol{real} - 1), $symbol{upload} .. ($symbol{upload_end} - 1)) {
my $word = $memory[$_] || 0;
print pack('CCC', $word / 65536, ($word / 256) % 256, $word % 256);
}