zombie-core-utils/diff.asm

38 lines
453 B
NASM
Raw Normal View History

extern puts
2021-09-19 12:44:18 -04:00
%include "../inc/diff_func.inc"
section .data
2021-09-18 06:31:46 -04:00
text db "REEEEEEEEEE",0
text2 db "REEEEEEErEE",0
differ db "they differ",0
notdiffer db "they do not differ",0
section .text
global main
main:
sub rsp, 8 ;enter
2021-09-18 06:31:46 -04:00
mov r8, text
mov r9, text2
2021-09-19 12:44:18 -04:00
call diff_func
2021-09-18 06:31:46 -04:00
cmp r10b, 0
2021-09-19 12:44:18 -04:00
jz _notdiffer
2021-09-18 06:31:46 -04:00
_differ:
mov rdi, differ
cld
call puts
jmp _end
_notdiffer:
mov rdi, notdiffer
cld
call puts
_end:
add rsp, 8 ;exit
ret