![]() |
COURS N° 5 - LES CHAINES DE CARACTERES |
| 48 | 65 | 6C | 6C | 6F | 20 | 57 | 6F | 72 | 6C | 64 | 20 | 21 | 0 |
|
.386 .MODEL FLAT, STDCALL OPTION CASEMAP:NONE INCLUDE \masm32\include\windows.inc INCLUDE \masm32\include\kernel32.inc INCLUDE \masm32\include\user32.inc INCLUDELIB \masm32\lib\kernel32.lib INCLUDELIB \masm32\lib\user32.lib MesDonnees SEGMENT 'data' ;La variable Msg représente la chaîne "Hello World !" terminée par un zéro (AZT) MaChaine DB 48h, 65h, 6Ch, 6Ch, 6Fh, 20h, 57h, 6Fh, 72h, 6Ch, 64h, 20h, 21h, 0h TitreMsg DB "MsgBox.asm", 0h MesDonnees ENDS MonCode SEGMENT 'code' Main: push MB_OK ;Bouton Ok. push OFFSET TitreMsg ;Titre de la fenêtre. push OFFSET MaChaine ;Message. push NULL ;hWnd dans ce cas il vaut 0. call MessageBox ;Affiche la boîte à messages. push 0h call ExitProcess MonCode ENDS END Main |