|
@@ -8,6 +8,8 @@ my $VERSION = 0.01;
|
|
|
|
|
|
# The array of intcodes making up the program
|
|
# The array of intcodes making up the program
|
|
my @program;
|
|
my @program;
|
|
|
|
+# A hash of labels and their corresponding starting line number
|
|
|
|
+my %labels;
|
|
# Opcodes that may be encounted and their corresponding ints
|
|
# Opcodes that may be encounted and their corresponding ints
|
|
my %opcodes = (
|
|
my %opcodes = (
|
|
"add" => "01",
|
|
"add" => "01",
|
|
@@ -41,8 +43,6 @@ sub parseAssembly
|
|
{
|
|
{
|
|
|
|
|
|
my @assembly = @_;
|
|
my @assembly = @_;
|
|
- # A hash of labels and their corresponding starting line number
|
|
|
|
- my %labels;
|
|
|
|
# The current instruction number
|
|
# The current instruction number
|
|
my $instructionNumber = 0;
|
|
my $instructionNumber = 0;
|
|
|
|
|