X-Git-Url: http://git.ieval.ro/?p=app-scheme79asm.git;a=blobdiff_plain;f=lib%2FApp%2FScheme79asm.pm;h=9b82af6b48acc40233c010736fc9c17f430fed57;hp=3ad0995a3312799d74bb3588c902f1b7f023b266;hb=3fff77b7cc8fa849a4c3157608c6a2bffe1eb557;hpb=f0289d3d9a2f8276b94399602df874c0f899862d diff --git a/lib/App/Scheme79asm.pm b/lib/App/Scheme79asm.pm index 3ad0995..9b82af6 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.004'; 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