we were dismissed , and the guards marched us out the castle halls to the stone battlements that ran the length of the front of the palace , there we reached the bridge which spanned across the chasm that separated the palace from the rest of the kingdom .