primeiro exemplo
This commit is contained in:
parent
52d1a2afbd
commit
348e041ff9
2 changed files with 10 additions and 1 deletions
|
@ -270,7 +270,7 @@ a =R15=.
|
|||
|
||||
* Primeiro exemplo em Assembly x86_64
|
||||
|
||||
#+begin_src asm
|
||||
#+begin_src asm :tangle exemplos/01/exit42.asm
|
||||
; Retorna 42 como estado de término
|
||||
|
||||
section .text
|
||||
|
|
9
curso/exemplos/01/exit42.asm
Normal file
9
curso/exemplos/01/exit42.asm
Normal file
|
@ -0,0 +1,9 @@
|
|||
; Retorna 42 como estado de término
|
||||
|
||||
section .text
|
||||
global _start
|
||||
|
||||
_start:
|
||||
mov rax, 60 ; syscall: exit
|
||||
mov rdi, 42 ; código de saída
|
||||
syscall
|
Loading…
Add table
Reference in a new issue