Hi!

This is a formula which can be used on my pocket calculator (Casio) and with it you can find out the weekday belonging to a given Date:

d=day : = divide
m=month * = multiply
y=year
e=buffer

Here it is: e = Int(d+y+(y-(m<3)):4+3*m-2*(m>2)-Int((m-1-(M>8)):2)+2)
e = (e-7*Int(e:7))

if e = 0 then weekday = Sunday
if e = 1 then weekday = Monday
if e = 2 then weekday = Tuesday
if e = 3 then weekday = Wednesday
if e = 4 then weekday = Thursday
if e = 5 then weekday = Friday
if e = 6 then weekday = Saturday

thanks for any help...
Posted on 2003-11-25 15:11:15 by ChigpA
If you divide you first clear EDX or it will be used as a remainder

Divide:

XOR EDX,EDX
mov eax,XXXX ; no. to divide
mov ebx,07h ; devisor
div ebx ; EAX receives dividend and EDX receives remainder

Multiply:

mov eax,XXXX ; number to mult.
mov ebx,52h ; multiplier
mult ebx ; result in eax
Posted on 2003-11-25 15:41:09 by mrgone
Someone has already done it for you:

http://www.asmcommunity.net/board/index.php?topic=4358&
Posted on 2003-11-25 21:39:19 by roticv