diff --git a/scans/bl.s b/scans/bl.s index 95111f1..a1fb671 100644 --- a/scans/bl.s +++ b/scans/bl.s @@ -11,7 +11,7 @@ jmp start cma tad lastv dac lastv - imq + lmq lac sp tad d1 dac sp i @@ -82,10 +82,10 @@ getc: 0 jmp getc i putc: 0 - and 0777 + and o777 sna jmp putc i - imq + lmq lac oflg sza jmp 1f @@ -132,7 +132,7 @@ flush: 0 lac obufp dac 1f lac .fout - sys write; 1: :.; .. + sys write; 1: ..; .. lac obufp dac cobufp dzm oflg diff --git a/src/cmd/bi.s b/src/cmd/bi.s index f8abd9d..b2a1d3f 100644 --- a/src/cmd/bi.s +++ b/src/cmd/bi.s @@ -11,7 +11,7 @@ fetch: lmq and o17777 dac addr - ecla lls 4 + cla; lls 4 " XXX replaced for now: ecla lls 4 tad .+3 dac .+1 jmp .. i diff --git a/src/cmd/bl.s b/src/cmd/bl.s index 95111f1..9da43e5 100644 --- a/src/cmd/bl.s +++ b/src/cmd/bl.s @@ -11,7 +11,7 @@ jmp start cma tad lastv dac lastv - imq + lmq lac sp tad d1 dac sp i @@ -82,10 +82,10 @@ getc: 0 jmp getc i putc: 0 - and 0777 + and o777 sna jmp putc i - imq + lmq lac oflg sza jmp 1f @@ -115,7 +115,7 @@ stop: jms flush las sma - sys save + sys exit " XXX replaced for now: sys save sys exit flush: 0 @@ -132,7 +132,7 @@ flush: 0 lac obufp dac 1f lac .fout - sys write; 1: :.; .. + sys write; 1: ..; .. lac obufp dac cobufp dzm oflg diff --git a/src/other/hello.b b/src/other/hello.b new file mode 100644 index 0000000..15a86ae --- /dev/null +++ b/src/other/hello.b @@ -0,0 +1,9 @@ +main $( + write('He'); + write('ll'); + write('o,'); + write(' W'); + write('or'); + write('ld'); + write('!*n'); +$) diff --git a/src/other/hello.s b/src/other/hello.s new file mode 100644 index 0000000..e552760 --- /dev/null +++ b/src/other/hello.s @@ -0,0 +1,40 @@ +.main: .+1 + s 2 + x .write + n 2 " etcop mark + n 5 " etcop litrl + 36965 + n 3 " etcop call + x .write + n 2 " etcop mark + n 5 " etcop litrl + 55404 + n 3 " etcop call + x .write + n 2 " etcop mark + n 5 " etcop litrl + 56876 + n 3 " etcop call + x .write + n 2 " etcop mark + n 5 " etcop litrl + 16471 + n 3 " etcop call + x .write + n 2 " etcop mark + n 5 " etcop litrl + 56946 + n 3 " etcop call + x .write + n 2 " etcop mark + n 5 " etcop litrl + 55396 + n 3 " etcop call + x .write + n 2 " etcop mark + n 5 " etcop litrl + 16906 + n 3 " etcop call + x .flush + n 1 " etcop mcall + n 7 " etcop retrn diff --git a/tools/a7out b/tools/a7out index 01ed008..ca0c398 100755 --- a/tools/a7out +++ b/tools/a7out @@ -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;