- ;il ya un peu plus d'explications dans le zip
- ;
- ;-----verifier si on est le premier du mois -----------------------------------------------------------------
- ; compiler avec :
- ;
- ; TASM32 /m /ml jour
- ; TLINK32 -Tpe -c -aa jour,,, import32.lib kernel32.lib
-
- .386
- .model flat
- jumps
-
- ;les API dont on a besoin ...
-
- extrn ExitProcess :PROC ;pour quitter le programme
- extrn MessageBoxA :PROC ;pour afficher
- extrn GetSystemTime:proc ;pour recuperer la date et l'heure systeme
-
- .data
- szbonnedate db 'c est la bonne date',0 ;name of API to find
-
- ;on reproduit SYSTEMTIME
-
- time: ; get time
- ayear dw 0 ; year
- amonth dw 0 ; month
- adayofweek dw 0 ;day of week
- aday dw 0 ; day
- ahour dw 0 ; hour
- aminute dw 0 ;minute
- asecond dw 0 ; seconde
- amilliseconds dw 0 ; milliseconds
- ;year,month,dayofweek,day etc...
- azas db 260 dup (0) ; buffer
-
- .code
- start:
-
-
-
- push offset time
- call GetSystemTime
- cmp byte ptr [aday],01d ; est-on le premier du mois?
- jne quitter
-
- ;si on est le premier alors on l'affiche avec une messagebox
-
- push 0
- push offset szbonnedate
- push offset szbonnedate
- push 0
- call MessageBoxA
-
- quitter:
- push 0
- call ExitProcess ;quitter
-
- end start
-
- ;-----fin de jour.asm-----------------------------------------------------------
;il ya un peu plus d'explications dans le zip
;
;-----verifier si on est le premier du mois -----------------------------------------------------------------
; compiler avec :
;
; TASM32 /m /ml jour
; TLINK32 -Tpe -c -aa jour,,, import32.lib kernel32.lib
.386
.model flat
jumps
;les API dont on a besoin ...
extrn ExitProcess :PROC ;pour quitter le programme
extrn MessageBoxA :PROC ;pour afficher
extrn GetSystemTime:proc ;pour recuperer la date et l'heure systeme
.data
szbonnedate db 'c est la bonne date',0 ;name of API to find
;on reproduit SYSTEMTIME
time: ; get time
ayear dw 0 ; year
amonth dw 0 ; month
adayofweek dw 0 ;day of week
aday dw 0 ; day
ahour dw 0 ; hour
aminute dw 0 ;minute
asecond dw 0 ; seconde
amilliseconds dw 0 ; milliseconds
;year,month,dayofweek,day etc...
azas db 260 dup (0) ; buffer
.code
start:
push offset time
call GetSystemTime
cmp byte ptr [aday],01d ; est-on le premier du mois?
jne quitter
;si on est le premier alors on l'affiche avec une messagebox
push 0
push offset szbonnedate
push offset szbonnedate
push 0
call MessageBoxA
quitter:
push 0
call ExitProcess ;quitter
end start
;-----fin de jour.asm-----------------------------------------------------------