Sign that word!

GolfScript, 1 byte

$

Yes, only 1 byte.

Try it here.


C (with x86), 61 bytes

s[];main(){qsort(s,read(0,s,99),1,"YXZQQQ\x8a\x00*\x02\x0f\xbe\xc0\xc3");puts(s);}

That string contains raw bytes, not actual \x.. codes, and it's a raw machine code callback passed to qsort. Works on x86 only:

59         pop   ecx
58         pop   eax
5a         pop   edx
51         push  ecx
51         push  ecx
51         push  ecx
8a 00      mov   al,  BYTE PTR [eax]
2a 02      sub   al,  BYTE PTR [edx]
0f be c0   movsx eax, al
c3         ret

Which is essentially:

int func(char *a, char *b) { return *a - *b; }

See p6-7 of this pamphlet in Japanese by shinh.


Stuck, 4 bytes

sc$d

This language was documented on the wiki just yesterday! Mmm, fresh esolangs.