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:
@@ -0,0 +1,9 @@
|
||||
main $(
|
||||
write('He');
|
||||
write('ll');
|
||||
write('o,');
|
||||
write(' W');
|
||||
write('or');
|
||||
write('ld');
|
||||
write('!*n');
|
||||
$)
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user