opcodes_lookup = {
    "NOP": "0x00",
    "AJMP addr11": "0x01",
    "LJMP addr16": "0x02",
    "RR A": "0x03",
    "INC A": "0x04",
    "INC DIRECT": "0x05",
    "INC @R0": "0x06",
    "INC @R1": "0x07",
    "INC R0": "0x08",
    "INC R1": "0x09",
    "INC R2": "0x0A",
    "INC R3": "0x0B",
    "INC R4": "0x0C",
    "INC R5": "0x0D",
    "INC R6": "0x0E",
    "INC R7": "0x0F",
    "JBC BIT DIRECT DIRECT": "0x10",
    "ACALL addr11": "0x11",
    "LCALL addr16": "0x12",
    "RRC A": "0x13",
    "DEC A": "0x14",
    "DEC DIRECT": "0x15",
    "DEC @R0": "0x16",
    "DEC @R1": "0x17",
    "DEC R0": "0x18",
    "DEC R1": "0x19",
    "DEC R2": "0x1A",
    "DEC R3": "0x1B",
    "DEC R4": "0x1C",
    "DEC R5": "0x1D",
    "DEC R6": "0x1E",
    "DEC R7": "0x1F",
    "JB BIT DIRECT DIRECT": "0x20",
    "AJMP addr11": "0x21",
    "RET": "0x22",
    "RL A": "0x23",
    "ADD A #IMMED": "0x24",
    "ADD A DIRECT": "0x25",
    "ADD A @R0": "0x26",
    "ADD A @R1": "0x27",
    "ADD A R0": "0x28",
    "ADD A R1": "0x29",
    "ADD A R2": "0x2A",
    "ADD A R3": "0x2B",
    "ADD A R4": "0x2C",
    "ADD A R5": "0x2D",
    "ADD A R6": "0x2E",
    "ADD A R7": "0x2F",
    "JNB BIT DIRECT DIRECT": "0x30",
    "ACALL addr11": "0x31",
    "RETI": "0x32",
    "RLC A": "0x33",
    "ADDC A #IMMED": "0x34",
    "ADDC A DIRECT": "0x35",
    "ADDC A @R0": "0x36",
    "ADDC A @R1": "0x37",
    "ADDC A R0": "0x38",
    "ADDC A R1": "0x39",
    "ADDC A R2": "0x3A",
    "ADDC A R3": "0x3B",
    "ADDC A R4": "0x3C",
    "ADDC A R5": "0x3D",
    "ADDC A R6": "0x3E",
    "ADDC A R7": "0x3F",
    "JC DIRECT DIRECT": "0x40",
    "AJMP addr11": "0x41",
    "ORL DIRECT A": "0x42",
    "ORL DIRECT #IMMED": "0x43",
    "ORL A #IMMED": "0x44",
    "ORL A DIRECT": "0x45",
    "ORL A @R0": "0x46",
    "ORL A @R1": "0x47",
    "ORL A R0": "0x48",
    "ORL A R1": "0x49",
    "ORL A R2": "0x4A",
    "ORL A R3": "0x4B",
    "ORL A R4": "0x4C",
    "ORL A R5": "0x4D",
    "ORL A R6": "0x4E",
    "ORL A R7": "0x4F",
    "JNC DIRECT DIRECT": "0x50",
    "ACALL addr11": "0x51",
    "ANL DIRECT A": "0x52",
    "ANL DIRECT #IMMED": "0x53",
    "ANL A #IMMED": "0x54",
    "ANL A DIRECT": "0x55",
    "ANL A @R0": "0x56",
    "ANL A @R1": "0x57",
    "ANL A R0": "0x58",
    "ANL A R1": "0x59",
    "ANL A R2": "0x5A",
    "ANL A R3": "0x5B",
    "ANL A R4": "0x5C",
    "ANL A R5": "0x5D",
    "ANL A R6": "0x5E",
    "ANL A R7": "0x5F",
    "JZ DIRECT DIRECT": "0x60",
    "AJMP addr11": "0x61",
    "XRL DIRECT A": "0x62",
    "XRL DIRECT #IMMED": "0x63",
    "XRL A #IMMED": "0x64",
    "XRL A DIRECT": "0x65",
    "XRL A @R0": "0x66",
    "XRL A @R1": "0x67",
    "XRL A R0": "0x68",
    "XRL A R1": "0x69",
    "XRL A R2": "0x6A",
    "XRL A R3": "0x6B",
    "XRL A R4": "0x6C",
    "XRL A R5": "0x6D",
    "XRL A R6": "0x6E",
    "XRL A R7": "0x6F",
    "JNZ DIRECT DIRECT": "0x70",
    "ACALL addr11": "0x71",
    "ORL C BIT": "0x72",
    "JMP @A+DPTR": "0x73",
    "MOV A #IMMED": "0x74",
    "MOV DIRECT #IMMED": "0x75",
    "MOV @R0 #IMMED": "0x76",
    "MOV @R1 #IMMED": "0x77",
    "MOV R0 #IMMED": "0x78",
    "MOV R1 #IMMED": "0x79",
    "MOV R2 #IMMED": "0x7A",
    "MOV R3 #IMMED": "0x7B",
    "MOV R4 #IMMED": "0x7C",
    "MOV R5 #IMMED": "0x7D",
    "MOV R6 #IMMED": "0x7E",
    "MOV R7 #IMMED": "0x7F",
    "SJMP DIRECT DIRECT": "0x80",
    "AJMP addr11": "0x81",
    "ANL C BIT": "0x82",
    "MOVC A @A+PC": "0x83",
    "DIV AB": "0x84",
    "MOV DIRECT DIRECT": "0x85",
    "MOV DIRECT @R0": "0x86",
    "MOV DIRECT @R1": "0x87",
    "MOV DIRECT R0": "0x88",
    "MOV DIRECT R1": "0x89",
    "MOV DIRECT R2": "0x8A",
    "MOV DIRECT R3": "0x8B",
    "MOV DIRECT R4": "0x8C",
    "MOV DIRECT R5": "0x8D",
    "MOV DIRECT R6": "0x8E",
    "MOV DIRECT R7": "0x8F",
    "MOV DPTR #IMMED": "0x90",
    "ACALL addr11": "0x91",
    "MOV BIT C": "0x92",
    "MOVC A @A+DPTR": "0x93",
    "SUBB A #IMMED": "0x94",
    "SUBB A DIRECT": "0x95",
    "SUBB A @R0": "0x96",
    "SUBB A @R1": "0x97",
    "SUBB A R0": "0x98",
    "SUBB A R1": "0x99",
    "SUBB A R2": "0x9A",
    "SUBB A R3": "0x9B",
    "SUBB A R4": "0x9C",
    "SUBB A R5": "0x9D",
    "SUBB A R6": "0x9E",
    "SUBB A R7": "0x9F",
    "ORL C /BIT": "0xA0",
    "AJMP addr11": "0xA1",
    "MOV C BIT": "0xA2",
    "INC DPTR": "0xA3",
    "MUL AB": "0xA4",
    "undefined": "0xA5",
    "MOV @R0 DIRECT": "0xA6",
    "MOV @R1 DIRECT": "0xA7",
    "MOV R0 DIRECT": "0xA8",
    "MOV R1 DIRECT": "0xA9",
    "MOV R2 DIRECT": "0xAA",
    "MOV R3 DIRECT": "0xAB",
    "MOV R4 DIRECT": "0xAC",
    "MOV R5 DIRECT": "0xAD",
    "MOV R6 DIRECT": "0xAE",
    "MOV R7 DIRECT": "0xAF",
    "ANL C /BIT": "0xB0",
    "ACALL addr11": "0xB1",
    "CPL BIT": "0xB2",
    "CPL C": "0xB3",
    "CJNE A #IMMED DIRECT DIRECT": "0xB4",
    "CJNE A DIRECT DIRECT DIRECT": "0xB5",
    "CJNE @R0 #IMMED DIRECT DIRECT": "0xB6",
    "CJNE @R1 #IMMED DIRECT DIRECT": "0xB7",
    "CJNE R0 #IMMED DIRECT DIRECT": "0xB8",
    "CJNE R1 #IMMED DIRECT DIRECT": "0xB9",
    "CJNE R2 #IMMED DIRECT DIRECT": "0xBA",
    "CJNE R3 #IMMED DIRECT DIRECT": "0xBB",
    "CJNE R4 #IMMED DIRECT DIRECT": "0xBC",
    "CJNE R5 #IMMED DIRECT DIRECT": "0xBD",
    "CJNE R6 #IMMED DIRECT DIRECT": "0xBE",
    "CJNE R7 #IMMED DIRECT DIRECT": "0xBF",
    "PUSH DIRECT": "0xC0",
    "AJMP addr11": "0xC1",
    "CLR BIT": "0xC2",
    "CLR C": "0xC3",
    "SWAP A": "0xC4",
    "XCH A DIRECT": "0xC5",
    "XCH A @R0": "0xC6",
    "XCH A @R1": "0xC7",
    "XCH A R0": "0xC8",
    "XCH A R1": "0xC9",
    "XCH A R2": "0xCA",
    "XCH A R3": "0xCB",
    "XCH A R4": "0xCC",
    "XCH A R5": "0xCD",
    "XCH A R6": "0xCE",
    "XCH A R7": "0xCF",
    "POP DIRECT": "0xD0",
    "ACALL addr11": "0xD1",
    "SETB BIT": "0xD2",
    "SETB C": "0xD3",
    "DA A": "0xD4",
    "DJNZ DIRECT DIRECT": "0xD5",
    "XCHD A @R0": "0xD6",
    "XCHD A @R1": "0xD7",
    "DJNZ R0 DIRECT DIRECT": "0xD8",
    "DJNZ R1 DIRECT DIRECT": "0xD9",
    "DJNZ R2 DIRECT DIRECT": "0xDA",
    "DJNZ R3 DIRECT DIRECT": "0xDB",
    "DJNZ R4 DIRECT DIRECT": "0xDC",
    "DJNZ R5 DIRECT DIRECT": "0xDD",
    "DJNZ R6 DIRECT DIRECT": "0xDE",
    "DJNZ R7 DIRECT DIRECT": "0xDF",
    "MOVX A @DPTR": "0xE0",
    "AJMP addr11": "0xE1",
    "MOVX A @R0": "0xE2",
    "MOVX A @R1": "0xE3",
    "CLR A": "0xE4",
    "MOV A DIRECT": "0xE5",
    "MOV A @R0": "0xE6",
    "MOV A @R1": "0xE7",
    "MOV A R0": "0xE8",
    "MOV A R1": "0xE9",
    "MOV A R2": "0xEA",
    "MOV A R3": "0xEB",
    "MOV A R4": "0xEC",
    "MOV A R5": "0xED",
    "MOV A R6": "0xEE",
    "MOV A R7": "0xEF",
    "MOVX @DPTR A": "0xF0",
    "ACALL addr11": "0xF1",
    "MOVX @R0 A": "0xF2",
    "MOVX @R1 A": "0xF3",
    "CPL A": "0xF4",
    "MOV DIRECT A": "0xF5",
    "MOV @R0 A": "0xF6",
    "MOV @R1 A": "0xF7",
    "MOV R0 A": "0xF8",
    "MOV R1 A": "0xF9",
    "MOV R2 A": "0xFA",
    "MOV R3 A": "0xFB",
    "MOV R4 A": "0xFC",
    "MOV R5 A": "0xFD",
    "MOV R6 A": "0xFE",
    "MOV R7 A": "0xFF",
    "ORG DIRECT": "0xFFFFFFDB",  # Database directive trick
    # custome intructions; now sure about anyother way
    "PUSH A": "0xC0",
    "PUSH B": "0xC0",
    "PUSH R0": "0xC0",
    "PUSH R1": "0xC0",
    "PUSH R2": "0xC0",
    "PUSH R3": "0xC0",
    "PUSH R4": "0xC0",
    "PUSH R5": "0xC0",
    "PUSH R6": "0xC0",
    "PUSH R7": "0xC0",
    "MOV SP #IMMED": "0x75",
}
