def getCode(self, opcode, type='C'):
    base = self.process(self.code, opcode)
    if ((opcode & 240) == 192):
        base = (base + ';$CYCLES++')
    isFirst = True
    while (base.find('$') >= 0):
        if isFirst:
            mWord = '$DF'
            isFirst = False
        else:
            m = re.search('(\\$[A-Za-z]+)', base)
            mWord = m.group(1)
        if (type == 'C'):
            base = base.replace(mWord, mWord[1:].upper())
        elif (type == 'T'):
            base = base.replace(mWord, ('this.' + mWord[1:].lower()))
        else:
            raise Exception()
    while (base.find(';;') >= 0):
        base = base.replace(';;', ';')
    if (base[0] == ';'):
        base = base[1:]
    return base
def getCode(self, opcode, type='C'):
    base = self.process(self.code, opcode)
    if ((opcode & 240) == 192):
        base = (base + ';$CYCLES++')
    isFirst = True
    while (base.find('$') >= 0):
        if isFirst:
            mWord = '$DF'
            isFirst = False
        else:
            m = re.search('(\\$[A-Za-z]+)', base)
            mWord = m.group(1)
        if (type == 'C'):
            base = base.replace(mWord, mWord[1:].upper())
        elif (type == 'T'):
            base = base.replace(mWord, ('this.' + mWord[1:].lower()))
        else:
            raise Exception()
    while (base.find(';;') >= 0):
        base = base.replace(';;', ';')
    if (base[0] == ';'):
        base = base[1:]
    return base