p = peripheral.wrap('top')

function list(side)
    local ml = peripheral.getMethods(side)
    for k,v in pairs(ml) do
        print(k..': '..v)
    end
end

function list_amd(side)
    local pl = peripheral.wrap(side)
    ml = pl.getAdvancedMethodsData()
    for k,v in pairs(ml) do
        print(k..': '..textutils.serialize(v))
    end
end

function show_in(side, slot)
    local pl = peripheral.wrap(side)
    local stack = pl.getStackInSlot(slot)
    print(textutils.serialize(stack))
end




list('bottom')
show_in('right', 1)
show_in('right', 2)