X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FApp%2FScheme79asm.pm;h=19e249c88cc74becdaf00795bd9ef59ce9cb0ae1;hb=7d76d131c08bd5eaa82c7c9c3a561166dd586abe;hp=3ad0995a3312799d74bb3588c902f1b7f023b266;hpb=f0289d3d9a2f8276b94399602df874c0f899862d;p=app-scheme79asm.git diff --git a/lib/App/Scheme79asm.pm b/lib/App/Scheme79asm.pm index 3ad0995..19e249c 100644 --- a/lib/App/Scheme79asm.pm +++ b/lib/App/Scheme79asm.pm @@ -8,7 +8,7 @@ use Data::Dumper qw/Dumper/; use Data::SExpression qw/consp scalarp/; use Scalar::Util qw/looks_like_number/; -our $VERSION = '0.002'; +our $VERSION = '0.003'; our %TYPES = ( LIST => 0, @@ -126,6 +126,8 @@ sub print_binary16 { my ($self, $fh) = @_; $fh //= \*STDOUT; + die "addr_bits + type_bits >= 16\n"if $self->{addr_bits} + $self->{type_bits} > 16; + my $length = @{$self->{memory}}; print $fh pack('n', $length); for (@{$self->{memory}}) {