br3392538.asm 604 B

12345678910111213141516171819202122232425262728
  1. bits 64
  2. default rel
  3. section .text
  4. global _start
  5. _start:
  6. mov rax, 1 ; write syscall
  7. mov rdi, 1
  8. mov rsi, msg
  9. mov rdx, msglen
  10. syscall
  11. mov rax, 60 ; exit syscall
  12. sub rdi, rdi
  13. syscall
  14. ; either of the following lines cause: Error in `nasm': double free or corruption ; Aborted (core dumped)
  15. foo
  16. ; warning: label alone on a line without a colon might be in error [-w+orphan-labels]
  17. mov r8, r9, r10
  18. ; error: invalid combination of opcode and operands
  19. add r8d, byte 80h
  20. ; warning: signed byte value exceeds bounds [-w+number-overflow]
  21. section .data
  22. msg db "Hello, world!", 10
  23. msglen equ $-msg