Trying to write a small program to compare two numbers (on NASM under Linux)
section .data value1 db 6 value2 db 77 messege_success db "success1!" lenSuccessMsg equ $-messege_success section .text global _start _start: mov eax,[value1] mov ebx,[value2] ;Сравнение, если eax<ebx, то переходим на success_story cmp eax,ebx jl success_story jmp exit_story success_story: mov eax, 4 mov ebx, 1 mov ecx, messege_success mov edx, lenSuccessMsg int 80h jmp exit_story exit_story: mov eax, 1 mov ebx, 0 int 80h
In theory, if eax is less than ebx, then there should be a transition to the success_story label, but the transition is always there (regardless of value2, we set 0 or 99, we still get the transition). What could be my mistake?