#! /usr/bin/perl

# expand output from G3 PRINT command to make life easier for other tools

#
#       0    0000          +0   #00000000    LDX   0  0
#
#       7    0000          +0   #00000000    LDX   0  0
#       8    000£         +20   #00000024    LDX   0  20
# 1234567

$pc = 0;

my $last;

while(<>) {
	next unless /(\d+)/;
	while ($pc++ < $1) {
		printf "%8d    %s", $pc - 1, $last;
	}
	print;
	$last = substr ($_, 12);
}
