mirror of
https://github.com/lloeki/python-dcpu_16.git
synced 2025-12-06 09:54:39 +01:00
JSR implemented
This commit is contained in:
parent
7f97d50ce0
commit
930a04473c
1 changed files with 3 additions and 2 deletions
|
|
@ -46,8 +46,9 @@ class valcode(object):
|
||||||
@opcode(0x0, 0x01)
|
@opcode(0x0, 0x01)
|
||||||
def JSR(c, a):
|
def JSR(c, a):
|
||||||
"""pushes the address of the next instruction to the stack, then sets PC to a"""
|
"""pushes the address of the next instruction to the stack, then sets PC to a"""
|
||||||
#pushnext
|
c.sp = (c.sp - 1) & wmask
|
||||||
c.pc = c[a]
|
c.m[c.sp] = c.pc
|
||||||
|
c.pc = a()
|
||||||
|
|
||||||
@opcode(0x1)
|
@opcode(0x1)
|
||||||
def SET(c, a, b):
|
def SET(c, a, b):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue