This tutorial explains how to calculate chain physics, which is emulating the movement of one sprite chained up to another moving sprite. I don't currently have an ASM code avaliable for this, but I'll be working on it.
1) Calculate the location of sprite 2, relative to sprite 1:
x2 - x1 => x
y2 - y1 => y
2) Make a copy of x and y (you'll understand why later):
x => xcopy
y => ycopy
3) Add inertia, to x and y:
x + xinertia => x
y + yinertia => y
4) Apply gravitational force
y + gravity => y
5) Calculate the distance between sprite 1 and sprite 2:
sqrt(x^2 + y^2) => d
6) Calculate the scale factor:
(radius1 + radius2) / d => s
7) Multiply the coordinates by the scale factor, so sprite 2 is at a distance of (radius1 + radius2) from sprite 1, but at the same angle from sprite 2 as it otherwise would've been.
x * s => x
y * s => y
8) Calculate new inertia value by subtracting the new coordinates by the old coordinates:
x - xcopy => xinertia
y - ycopy => yinertia
9) Calculate final screen coordinates of sprite 2:
x + x1 => x2
y + y1 => y2
x - xcopy => xinertia
y - ycopy => yinertia
9) Calculate final screen coordinates of sprite 2:
x + x1 => x2
y + y1 => y2