Successful first run of B interpreter!

I hand compiled hello.b into hello.s and assembled with the interpreter
and runtime library:
perl as7 --out a.out bl.s hello.s bi.s
This commit is contained in:
rswier
2016-03-07 05:57:30 -05:00
parent a7f040b8f5
commit 28a98360a4
6 changed files with 69 additions and 10 deletions
+10
View File
@@ -543,6 +543,16 @@ sub eae {
$PC++;
return;
}
if ( $maskedinstr == 0640600 ) { # lls: long left shift
dprintf( "lls AC %06o step %d\n", $AC, $step );
foreach my $i ( 1 .. $step ) {
my $MQmsb = ( $MQ & SIGN ) ? 1 : 0;
$AC = ( ( $AC << 1 ) | $MQmsb ) & MAXINT;
$MQ = ( ( $MQ << 1 ) | ( ($LINK) ? 1 : 0 ) ) & MAXINT; # XXX how to handle unsigned?
}
$PC++;
return;
}
if ( $maskedinstr == 0640700 ) { # als: AC left shift
dprintf( "als AC %06o step %d\n", $AC, $step );
$AC = ( $AC << $step ) & MAXINT;