cradleasm7.asm 369 B

1234567891011121314151617181920212223242526272829303132
  1. [BITS 64]
  2. ; begining of the assembly program
  3. %define SYS_EXIT 60
  4. %define SYS_WRITE 1
  5. %define STD_IN 0
  6. %define STD_OUT 1
  7. %define STD_ERR 2
  8. section .bss
  9. ; nada
  10. section .data
  11. section .text
  12. global _start
  13. _start:
  14. mov rax,5
  15. push rax
  16. mov rax,6
  17. pop rbx
  18. add rax, rbx
  19. push rax
  20. mov rax,8
  21. pop rbx
  22. imul rax, rbx
  23. ; end of program
  24. mov rdi,0
  25. mov rax,SYS_EXIT
  26. syscall