我正在使用 X86 程序集,需要按字符比较两个缓冲区并在第三个缓冲区中反映它们是否匹配
伪代码:
Compare(ESI=msg_buffer_ptr, EDI=recover_buffer_ptr, EBX=err_buffer_ptr)
;Compare a character in ESI && EDI
;if ESI == 0 then we are at the end of the string and just return after adding add a 0 to EBX
;if they equal; " " -> EBX
;if it's a 0dh or 0ah, then transpose them into EBX
;else if they don't equal; "X" -> EBX
;Loop to next character
我无法弄清楚如何按每个字符访问 。