.title streq String Equality Test .ident /000001/ ; ;+ ; ; Index Test strings for equality ; ; Usage ; ; streq(a, b); ; char *a; ; char *b; ; ; Description ; ; Return TRUE if the strings are equal. ; ; Bugs ; ;- ; ; Edit history ; 000001 05-Mar-80 MM Initial edit ; .psect c$code streq:: mov 2(sp),r0 ; Pick up 'a' mov 4(sp),r1 ; And 'b' 10$: cmpb (r0)+,(r1) ; Are they the same bne 20$ ; No tstb (r1)+ ; At the end of the string bne 10$ ; No mov #1,r0 ; Make value 'true' return ; and exit 20$: clr r0 ; Return 'false' return ; Back to user .end