Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add more debugging information to lasm as well add data a legal type.

  • Loading branch information...
commit 66109c08d29e4465b01774ece05b0b40a2f7668b 1 parent 2a613f3
@atrodo authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 lasm.pl
View
7 lasm.pl
@@ -907,6 +907,8 @@ sub gen_op
{
$stmt->{const} = $stmt->{imm}+0;
} elsif (exists $stmt->{jmp}) {
+ die "No such label: ". $stmt->{jmp}
+ unless defined $labels{$stmt->{jmp}};
$stmt->{const} = $labels{$stmt->{jmp}}+0;
} elsif (exists $stmt->{offset}) {
#die "offsets are awkward right now, sorry";
@@ -925,7 +927,7 @@ sub gen_op
if !defined $ref_block;
my $offset = $ref_block->{$stmt->{offset}->{id}};
- die "Could not find a usable id in block"
+ die "Could not find a usable id in block: " . $stmt->{offset}->{id}
if !defined $offset;
$stmt->{const} = $offset + ($stmt->{offset}->{offset} || 0);
} else {
@@ -937,6 +939,9 @@ sub gen_op
}
elsif ($seg->{typed} eq "const")
{
+ }
+ elsif ($seg->{typed} eq "data")
+ {
#$output .= pack("I", 1);
#$output .= pack("IZ*", length($seg->{named})+1, $seg->{named});
# ...
Please sign in to comment.
Something went wrong with that request. Please try again.