.TITLE STRCMP .IDENT /X01.00/ ; ; Author: Gilbert J. DeLeeuw ; Date: May 3, 1984 ; Name: STRCMP - Compare strings ; Function: Compare two strings, setting condition codes ; ; ; Parameters: ; R2 - Size of input string ; R3 - Address of input string ; R4 - Address of test string ; STRCMP:: ; ; Test for null byte TSTB (R3) ;Null byte in input string? BEQ DONE ;Yes ; ; Compare bytes CMPB (R3)+,(R4)+ ;Compare characters BNE DONE ;Different? SOB R2,STRCMP ;Loop over length ; ; Done DONE: RTS PC ;Return to caller .END