The AROS version of BCPL compch at GV offset $130 (called charicmp in the AROS source) returns a value with the wrong sign.
The Kickstart implementation of compch subtracts the two arguments: retval = uppercase(char1) - uppercase(char2). The result is negative if 1st arg earlier than the second, positive if 1st arg is later. However the current AROS code returns the opposite: retval = uppercase(char2) - uppercase(char1).
To fix that, replace the instruction before BRTS in charicmp with this:
2: sub.l %d0,%d1
move.l %d1,%d0 ;Because BRTS moves d0 to d1
Log in to post a comment.