The unified diff between revisions [7545a705..] and [34f8050e..] is displayed below. It can also be downloaded as a raw diff.

#
# old_revision [7545a705ffc98f2e5a6bbd0ef5553f1732ff1ffc]
# new_revision [34f8050e1dacbf46115264d7077d7a0098397e5f]
#
# patch "disassem.pl"
#  from [057d76a4ede1ada256c5fef8e15bf66d5c8abf2f]
#    to [02870da1e88f2384ce53dafaa61e56202225c42d]
#
============================================================
--- disassem.pl	057d76a4ede1ada256c5fef8e15bf66d5c8abf2f
+++ disassem.pl	02870da1e88f2384ce53dafaa61e56202225c42d
@@ -56,6 +56,21 @@ $labelnum = 0;
 %labels = {};
 $labelnum = 0;
 
+if (open LABELS, "<input.labels") {
+    while (<LABELS>) {
+	chomp;
+	if (($name, $addr) = /(.*): (.*)/) {
+	    $addr = hex $addr;
+	    $labels{$addr} = $name;
+	    if ($name =~ /^L(\d+)$/) {
+		$labelnum = $1 + 1 if ($labelnum >= $1);
+	    }
+	}
+    }
+}
+
+close LABELS;
+
 $output = 0;
 
 %io = (
@@ -192,6 +207,15 @@ for my $pass (0..1) {
     }
 }
 
+open LABELS, ">input.labels" or die $!;
+
+foreach my $addr (sort keys %labels) {
+    printf LABELS "%s: %.6x\n", $labels{$addr}, $addr
+	if defined($labels{$addr});
+}
+
+close LABELS;
+
 sub disassemble
 {
     my ($start) = @_;