spaghetti.asm 439 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. section .bss
  2. st resb 6 ; 6 byte for death
  3. section .data
  4. ge db 'greater/equal' , 0xa
  5. gec equ $ - ge
  6. lt db 'lower then' , 0xa
  7. ltc equ $ - lt
  8. section .text
  9. global _start
  10. _start:
  11. mov eax, 55
  12. mov ebx, 100
  13. cmp eax,ebx
  14. jge greater
  15. lower:
  16. mov eax, 4
  17. mov ebx, 1
  18. mov ecx, lt
  19. mov edx, ltc
  20. int 0x80
  21. jmp exit
  22. greater:
  23. mov eax, 4
  24. mov ebx, 1
  25. mov ecx, ge
  26. mov edx, gec
  27. int 0x80
  28. exit:
  29. mov eax, 1
  30. mov ebx, 0
  31. int 0x80