JSR implemented

This commit is contained in:
Loic Nageleisen 2012-04-08 18:24:39 +02:00
parent 7f97d50ce0
commit 930a04473c

View file

@ -46,8 +46,9 @@ class valcode(object):
@opcode(0x0, 0x01)
def JSR(c, a):
"""pushes the address of the next instruction to the stack, then sets PC to a"""
#pushnext
c.pc = c[a]
c.sp = (c.sp - 1) & wmask
c.m[c.sp] = c.pc
c.pc = a()
@opcode(0x1)
def SET(c, a, b):