Subtracting two characters
问题 I just started programming in assembly so I am a beginner. To practice, I am trying to rewrite a basic libc in assembly (NASM Intel syntax). But I'm stuck on the strcmp function: ;; Compare two C-style NUL-terminated strings ;; Inputs : ESI = address of s1, EDI = address of s2 ;; Outputs : EAX = return an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2 strcmp: call strlen mov ecx, eax ; ecx = length of the string