def _pload(offset, size):
    """ Generic parameter loading.
    Emmits output code for setting IX at the right location.
    size = Number of bytes to load:
        1 => 8 bit value
        2 => 16 bit value / string
        4 => 32 bit value / f16 value
        5 => 40 bit value
    """
    output = []

    indirect = offset[0] == '*'
    if indirect:
        offset = offset[1:]

    I = int(offset)
    if I >= 0:  # If it is a parameter, round up to even bytes
        I += 4 + (size % 2 if not indirect else 0)  # Return Address + "push IX"

    ix_changed = (indirect or size < 5) and (abs(I) + size) > 127  # Offset > 127 bytes. Need to change IX
    if ix_changed:  # more than 1 byte
        output.append('push ix')
        output.append('ld de, %i' % I)
        output.append('add ix, de')
        I = 0
    elif size == 5:  # For floating point numbers we always use DE as IX offset
        output.append('push ix')
        output.append('pop hl')
        output.append('ld de, %i' % I)
        output.append('add hl, de')
        I = 0

    if indirect:
        output.append('ld h, (ix%+i)' % (I + 1))
        output.append('ld l, (ix%+i)' % I)

        if size == 1:
            output.append('ld a, (hl)')
        elif size == 2:
            output.append('ld c, (hl)')
            output.append('inc hl')
            output.append('ld h, (hl)')
            output.append('ld l, c')
        elif size == 4:
            output.append('call __ILOAD32')
            REQUIRES.add('iload32.asm')
        else:  # Floating point
            output.append('call __ILOADF')
            REQUIRES.add('iloadf.asm')
    else:
        if size == 1:
            output.append('ld a, (ix%+i)' % I)
        else:
            if size <= 4:  # 16/32bit integer, low part
                output.append('ld l, (ix%+i)' % I)
                output.append('ld h, (ix%+i)' % (I + 1))

                if size > 2:  # 32 bit integer, high part
                    output.append('ld e, (ix%+i)' % (I + 2))
                    output.append('ld d, (ix%+i)' % (I + 3))

            else:  # Floating point
                output.append('call __PLOADF')
                REQUIRES.add('ploadf.asm')

    if ix_changed:
        output.append('pop ix')

    return output
Generic parameter loading.
    Emmits output code for setting IX at the right location.
    size = Number of bytes to load:
        1 => 8 bit value
        2 => 16 bit value / string
        4 => 32 bit value / f16 value
        5 => 40 bit value