Preheat oven to 350 degrees F. Wash and boil yams in skins until tender. Cool, peel and slice lengthwise.
In a 2-quart casserole, arrange half the yams; spread with 1/4 cup sugar, cinnamon, and half the butter. Add apples, arranging as a layer. Repeat sugar, cinnamon and butter layer. Top with remaining half of yams, 1/4 cup of sugar, and cinnamon sprinkled over all. Bake 1 hour. Arrange marshmallows on top and place under broiler until golden, about 5 minutes.