Source

wd_pys60 / wd_asm.py

Full commit
STACK_SIZE=256#byte
stack=["00000000"]*STACK_SIZE

class Register(object):
    """
    length : 4byte,32bit
    """
    all=[]#all registers
    def __init__(self):
        self.position=STACK_SIZE-(len(Register.all)+1)*4
        #print self.all
        Register.all.append(self)
    def get(self):
        return stack[self.position:self.position+4]
register=[Register(),Register(),Register(),Register()]
#print stack
for r in register:
    print r.position,r.get()
position=0
def allcote(size):
    pass