Skip to content

Commit

Permalink
Merge pull request #28 from aheui/fix-mov
Browse files Browse the repository at this point in the history
되돌아오는 ㅆ의 stacksize 수정
  • Loading branch information
puzzlet committed Apr 1, 2024
2 parents 3f82ae0 + 2cfe6e6 commit 8251758
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aheui/aheui.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,10 @@ def mainloop(program, debug):
elif op == c.OP_MOV:
r = selected.pop()
value = program.get_operand(pc)
storage[value].push(r)
targeted = storage[value]
targeted.push(r)
if selected == targeted:
stacksize += 1
elif op == c.OP_CMP:
selected.cmp()
elif op == c.OP_BRPOP1 or op == c.OP_BRPOP2 or op == c.OP_JMP or op == c.OP_BRZ:
Expand Down

0 comments on commit 8251758

Please sign in to comment.