X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FApp%2FScheme79asm.pm;h=18a68c82401abb1270d051687f2a53ae25dca214;hb=8ff4c670a59a17d4bbfd852fdb9f4cbb871c21d8;hp=3ad0995a3312799d74bb3588c902f1b7f023b266;hpb=f0289d3d9a2f8276b94399602df874c0f899862d;p=app-scheme79asm.git diff --git a/lib/App/Scheme79asm.pm b/lib/App/Scheme79asm.pm index 3ad0995..18a68c8 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}}) { @@ -313,6 +315,13 @@ Parse a sequence of S-expressions and lay it out in memory. Can be called multiple times to lay out multiple sequences of S-expressions one after another. +=item $asm->B(I<$sexp>) + +Given an already-parsed sexp (meaning a +L object), lay it out in memory. +Can be called multiple times to lay out multiple sequences of +S-expressions one after another. + =item $asm->B Move the last pointer to position 5, and put the free pointer at