def parameter_parser(parameter_code_list, parameter_list, code_list, opcode):
    """
    Accepts parameter_code_list, parameter_list and code_list [lists] from a particular opcode instruction and subsequent entries.
    Returns list of parameters.
    """

    for i in range(len(parameter_list)-1):
        if i >= len(parameter_code_list):
            parameter_list[i] = code_list[parameter_list[i]]
        elif parameter_code_list[i] == 0:
            parameter_list[i] = code_list[parameter_list[i]]
        elif parameter_code_list[i] == 1:
            parameter_list[i] = parameter_list[i]
        else:
            print('And I oop....parameter_creator')

    if opcode in {4} and len(parameter_code_list) < 1:
        parameter_list[-1] = code_list[parameter_list[-1]]
        
    if opcode in {5, 6 } and len(parameter_code_list) < 2:
        parameter_list[-1] = code_list[parameter_list[-1]]
    
    return parameter_list