Solution (source code)

= Solution

Use the same bias, then an <arithmetic right shift> by ten:
``
div1024:
    asrs r3, r0, #31    // -1 when a<0, otherwise 0
    lsrs r3, r3, #22    // b = 1023 when a<0, otherwise 0
    adds r0, r0, r3     // a+b, representable for every signed input
    asrs r0, r0, #10    // floor((a+b)/1024)
    bx lr
``
An <arithmetic right shift> of a <two's complement> <integer> computes division rounded down. For $a\geq0$, this already equals truncation towards zero. For $a<0$, the <signed power-of-two division by biasing> identity is
$$
\boxed{\operatorname{trunc}(a/1024)=\left\lfloor\frac{a+1023}{1024}\right\rfloor.}
$$
Indeed, writing $-a=1024q+r$ with $0\leq r<1024$ makes the adjusted numerator $-1024q+(1023-r)$; its quotient rounded down is $-q$ for every $r$, including zero. Thus the code returns the signed quotient in all cases and contains no data-dependent branch. The final `bx lr` simply returns to the caller.