/ / PDP-11 C. / Stdio. / / Compare two character strings. / .globl equal / / equal(a, b) / char *a, *b; / Returns true if equal. / equal: mov 2(sp),r0 /Pick up `a' mov 4(sp),r1 /And `b' 0: cmpb (r0)+,(r1) /Are they the same bne 0f /No tstb (r1)+ /At the end of the string bne 0b /No mov $1,r0 /True return rts pc / 0: clr r0 /False return rts pc /