Many machines that are used in forest, mining and construction industries, are mobile, heavy-duty and carry hydraulically-actuated manipulators. They constantly interact with unstructured environments and experience different loading. As a result, these machines are susceptible to tipping-over. This thesis is concerned with the development of a suitable algorithm for computing the margin of stability of such mobile manipulators in real-time. The margin of stability shows the proximity of the machine to tipping-over condition at each instant. The stability analysis algorithm developed in this thesis is an extension of the method by Messuri and Klien (1985) and is able to quantitatively reflect the effect of all relevant factors on the machine stability. These factors include the location of the centre of gravity, spatially placed contact points with ground, presence of substantial forces and moments arising from the manipulation of the implement, and rough terrain condition. The algorithm first determines the instantaneous unstable configuration about each axis of potential overturning of the machine. A new concept called 'equilibrium plane' is defined for this purpose. When the machine is hypothetically rotated around the edge until the center of gravity falls in this plane, the net moment around the edge becomes minimum in the absolute sense. The amount of the work necessary to bring the machine from the current stable position to this verge of instability is then computed to determine the margin of stability. The methodology and algorithm developed in this thesis is exemplified with an excavator-based log loader. The algorithm is implemented in a simulation program written in C language and real-time aspect of it is studied. Simulation studies of the candidate machine clearly show that the forces and moments arising from the manipulation of the implement are important in stability status and thus cannot be overlooked. Furthermore, a simple two-dimensional graphical display format is proposed for quantitative demonstration (to the machine operator) of the proximity to instability at each instant.