sort psect list in .log file in asc addr order instead of name order

This commit is contained in:
AK6DN 2019-03-25 20:17:31 -07:00
parent fd0eea148e
commit fa38443f8a

View File

@ -822,7 +822,7 @@ sub parse_rec ($$$) {
printf $LOG "..ENDGSD\n\n" if $DEBUG;
$program{END}{ADDRESS} = 0;
foreach my $nam (sort(keys(%psect))) {
foreach my $nam (sort({$psect{$a}{START} == $psect{$b}{START} ? $psect{$a}{LENGTH} <=> $psect{$b}{LENGTH} : $psect{$a}{START} <=> $psect{$b}{START}} keys(%psect))) {
my $start = $psect{$nam}{START};
my $length = $psect{$nam}{LENGTH};
my $end = $length ? $start + $length - 1 : $start;