.title seql ; ; this routine implements the following fortran interface ; ; status = seql(a, b) ; ; where a and b are EOS-terminated strings. If they are equal, ; status is returnes as YES(1), otherwise NO(0) ; ap=%5 a=2 b=4 yes=1 no=0 seql:: mov a(ap),r1 ; address of a(1) in r1 mov b(ap),r2 ; address of b(1) in r2 mov #no,r0 ; initialize return value to NO 10$: cmpb (r1)+,(r2) ; compare the next character bne 20$ ; if !=, then return tstb (r2)+ ; see if this character is EOS(0) bne 10$ ; not EOS, try next character mov #yes,r0 ; all characters equal, return YES 20$: return .end