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:
+4
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user