JulianToGregorian (pour archive)

Pour discuter de l'assembleur
Mesa
Messages : 1093
Inscription : mer. 14/sept./2011 16:59

JulianToGregorian (pour archive)

Message par Mesa »

Code : Tout sélectionner

; DWORD JulianToGregorian(DWORD Yj, DWORD Mj, DWORD Dj, DWORD* Yg, DWORD* Mg, DWORD* Dg)
;
; This function converts the Julian date to the adequate Gregorian date.
;
; Parameters:
;	Yj - year of the Julian date,
;	Mj - month of the Julian date,
;	Dj - day of the Julian date,
;	Yg - pointer to variable where the calculated year number of the Gregorian date will be stored,
;	Mg - pointer to variable where the calculated month number of the Gregorian date will be stored,
;	Dg - pointer to variable where the calculated day number of the Gregorian date will be stored.
;
; Returned values:
;	* 0 for the valid Julian date,
;	* -1 in opposite case.
;
Procedure.l JulianToGregorian( Yj.l, Mj.l, Dj.l, Yg.l, Mg.l, Dg.l)
  Protected tmpeax.l
  EnableASM
  juliantonum:
  DateToAbsDayNum( Yj, Mj, Dj, 0)
  MOV tmpeax, eax
  TEST	eax, eax
  JZ	l_juliantogregorian_error
  
  numtogregorian:
  AbsDayNumToDate( tmpeax, 1, Yg, Mg, Dg)
  JMP	l_juliantogregorian_theend
  
  error:
  MOV	eax, -1
  
  theend:
  
  DisableASM
  ProcedureReturn

EndProcedure
M.
Avatar de l’utilisateur
kernadec
Messages : 1594
Inscription : ven. 25/avr./2008 11:14

Re: JulianToGregorian (pour archive)

Message par kernadec »

bonsoir aleeza
voici l'adresse ou Mesa à terminé ce projet:
http://www.purebasic.fr/french/viewtopi ... 12&t=14145

Cordialement
Avatar de l’utilisateur
falsam
Messages : 7244
Inscription : dim. 22/août/2010 15:24
Localisation : IDF (Yvelines)
Contact :

Re: JulianToGregorian (pour archive)

Message par falsam »

aleeza est un bot ou un plaisantin qui n'a fait que répéter les commentaires du code de Mesa. Son message ainsi que les commentaires qui suivent sont à mon avis à supprimer.

PS: Ce n'est pas la première fois que je vois cette signature (sara)
Configuration : Windows 11 Famille 64-bit - PB 6.03 x64 - AMD Ryzen 7 - 16 GO RAM
Vidéo NVIDIA GeForce GTX 1650 Ti - Résolution 1920x1080 - Mise à l'échelle 125%
Avatar de l’utilisateur
kernadec
Messages : 1594
Inscription : ven. 25/avr./2008 11:14

Re: JulianToGregorian (pour archive)

Message par kernadec »

bonjour falsam
OOoooh, M... :?
Mais bon voilà ....en fait cela donne une infos pour la personne qui arrive sur ce post, il pourra suivre ce thème :D
bonne journée
Répondre