fix in assembly file

This commit is contained in:
Sam Hadow 2024-04-09 18:27:06 +02:00
parent cd1d6382fd
commit fa92ee4364
2 changed files with 4 additions and 3 deletions

View File

@ -103,9 +103,10 @@ class Ram(object):
Run machine to completion
'''
while self.current < len(self.instr):
print(self.current)
print(*self.instr[self.current]['args'])
print(self.current+2)
#print(*self.instr[self.current]['args'])
self.instr[self.current]['op'](self, *self.instr[self.current]['args'])
print(self.work_registers)
def generate_graph(self):
'''

View File

@ -58,7 +58,7 @@ JUMP(-38) // restart loop
SUB(r6, 1, r9) // address symbol to copy on stack
JE(r9, r5, -40) // inner loop condition, restart outer loop
ADD(r11, 1, r11)
ADD(i@r11, i@r9)
ADD(i@r9, 0, r@r11)
SUB(r9, 1, r9)
JUMP(-4)