mirror of
https://github.com/ksherlock/hystricomorph.git
synced 2024-06-01 14:41:29 +00:00
add dummy segment, cleanup label cleanup
This commit is contained in:
parent
3101873578
commit
f1b2db8e0b
6
asm.py
6
asm.py
|
@ -70,12 +70,11 @@ class Assembler(object):
|
||||||
if len(ll)>0:
|
if len(ll)>0:
|
||||||
first = ll[0]
|
first = ll[0]
|
||||||
for l in ll: map[l] = first
|
for l in ll: map[l] = first
|
||||||
|
b.labels = [first]
|
||||||
|
|
||||||
for b in self.blocks:
|
for b in self.blocks:
|
||||||
if b.bne:
|
if b.bne:
|
||||||
b.bne = map[b.bne]
|
b.bne = map[b.bne]
|
||||||
if len(b.labels)>1:
|
|
||||||
b.labels = b.labels[0:1]
|
|
||||||
|
|
||||||
def reify_branches(self):
|
def reify_branches(self):
|
||||||
# in practice all branches are forward
|
# in practice all branches are forward
|
||||||
|
@ -147,7 +146,8 @@ class Assembler(object):
|
||||||
self.new_block()
|
self.new_block()
|
||||||
|
|
||||||
def header(self, io):
|
def header(self, io):
|
||||||
io.write("\t case on\n");
|
io.write("\tcase on\n");
|
||||||
|
io.write("dummy\tSTART\n\tEND\n\n")
|
||||||
io.write(self.name + "\tSTART\n\n")
|
io.write(self.name + "\tSTART\n\n")
|
||||||
io.write("cp\tequ 5\n")
|
io.write("cp\tequ 5\n")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user