Assembleur MASM
Résolu/Fermé
Utilisateur anonyme
-
Modifié par EchoIsON le 3/02/2016 à 22:24
Sugel Messages postés 4076 Date d'inscription jeudi 18 août 2011 Statut Membre Dernière intervention 19 juin 2017 - 28 juin 2016 à 17:00
Sugel Messages postés 4076 Date d'inscription jeudi 18 août 2011 Statut Membre Dernière intervention 19 juin 2017 - 28 juin 2016 à 17:00
A voir également:
- Assembleur MASM
- Logiciel assembleur - Télécharger - Édition & Programmation
- While en assembleur ✓ - Forum Programmation
- Tp corrigé assembleur 8086 - Forum Programmation
- Assembleur 8086 - Forum Programmation
- Assembleur 8086 - Forum Programmation
2 réponses
Sugel
Messages postés
4076
Date d'inscription
jeudi 18 août 2011
Statut
Membre
Dernière intervention
19 juin 2017
726
28 juin 2016 à 17:00
28 juin 2016 à 17:00
Je touche pas à masm, mais voici la même avec nasm :
section .text
global _start
_start:
mov r12,0 ; r12 = 0;
loop:
mov rax,4
mov rbx,1
mov rcx, hello
mov rdx, helloLen
int 80h ; syscall(SYS_WRITE, STDOUT, hello, helloLen)
inc r12 ; r12++;
cmp r12, 3 ; if (r12 < 3)
jb loop ; goto loop;
mov rax,1 ; sys_exit
mov rbx,0 ; code 0 (EXIT_SUCCESS)
int 80h ; syscall(SYS_EXIT, EXIT_SUCCESS);
section .data
hello: db 'Coucou hibou!',10
helloLen: equ $-hello