Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .386
- .model flat, stdcall ;32 bit memory model
- option casemap :none ;case insensitive
- include \masm32\include\windows.inc
- include \masm32\include\kernel32.inc
- include \masm32\include\masm32rt.inc
- includelib \masm32\lib\kernel32.lib
- .data
- chaine db "Bonjour",0 ; Chaine à répéter
- crlf db 10,0 ; Retour chariot
- count db 0 ; Compteur initialisé à 0
- .data?
- asked_value db (?) ; Valeur rentrée par l'utilisateur
- .const
- .code
- start:
- demande: invoke StdIn, addr asked_value, 8
- invoke atodw, addr asked_value
- cmp eax, 0
- jbe demande
- mov asked_value, al
- boucle:
- invoke StdOut, addr chaine
- invoke StdOut, addr crlf
- inc count
- mov bl, count
- cmp bl, asked_value
- mov count, bl
- jb boucle
- invoke StdOut, addr crlf
- invoke StdOut, addr crlf
- inkey
- push 0
- call ExitProcess
- end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement