it was hard , as the walls were of dressed stone and gave few opportunities for footholds , but embrasures near the top allowed him to gain a firm place to lodge himself while he peered warily over the battlements ' edge .