The MASM Forum

General => The Campus => Topic started by: asm on February 08, 2013, 07:04:34 AM

Title: How can I change the date on microscheme clock real time?
Post by: asm on February 08, 2013, 07:04:34 AM
How can I change the date on microscheme clock real time?
Title: Re: How can I change the date on microscheme clock real time?
Post by: hfheatherfox07 on February 08, 2013, 07:43:15 AM
Hello,
You posted the same question here:
http://stackoverflow.com/questions/14759271/how-can-i-change-the-date

What do you mean ?

You want to reprogram a chip???

You use a programming language to write apps for windows or what ever OS



Title: Re: How can I change the date on microscheme clock real time?
Post by: asm on February 08, 2013, 07:57:19 AM
Quote from: hfheatherfox07 on February 08, 2013, 07:43:15 AM
You use a programming language to write apps for windows or what ever OS
Yes, for windows

Quote from: hfheatherfox07 on February 08, 2013, 07:43:15 AM
What do you mean ?

You want to reprogram a chip???

No, just change the date in system clock tray using asm
Title: Re: How can I change the date on microscheme clock real time?
Post by: qWord on February 08, 2013, 08:02:05 AM
Take a look at Window's Time Functions (http://msdn.microsoft.com/en-us/library/windows/desktop/ms725473%28v=vs.85%29.aspx). Changing the System time probably also needs higher rights.
Title: Re: How can I change the date on microscheme clock real time?
Post by: hfheatherfox07 on February 08, 2013, 08:16:36 AM
You may need to turn off Internet clock cync


http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/windows_date_turn_off_synch.mspx?mfr=true
Title: Re: How can I change the date on microscheme clock real time?
Post by: asm on February 08, 2013, 08:30:41 AM
Quote from: hfheatherfox07 on February 08, 2013, 08:16:36 AM
You may need to turn off Internet clock cync


http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/windows_date_turn_off_synch.mspx?mfr=true


thanks, i understand.
What about code? What language construction i must use to do it?
Title: Re: How can I change the date on microscheme clock real time?
Post by: hfheatherfox07 on February 08, 2013, 08:35:59 AM
Quote from: qWord on February 08, 2013, 08:02:05 AM
Take a look at Window's Time Functions (http://msdn.microsoft.com/en-us/library/windows/desktop/ms725473%28v=vs.85%29.aspx). Changing the System time probably also needs higher rights.

qWord is right .... :biggrin:

Invoke setsystemtime

See here :
http://www.masmforum.com/board/index.php?topic=1944.0
Title: Re: How can I change the date on microscheme clock real time?
Post by: asm on February 08, 2013, 09:22:57 AM
Quote from: hfheatherfox07 on February 08, 2013, 08:35:59 AM
Quote from: qWord on February 08, 2013, 08:02:05 AM
Take a look at Window's Time Functions (http://msdn.microsoft.com/en-us/library/windows/desktop/ms725473%28v=vs.85%29.aspx). Changing the System time probably also needs higher rights.

qWord is right .... :biggrin:

Invoke setsystemtime

See here :
http://www.masmforum.com/board/index.php?topic=1944.0
i make easier:
.model tiny
.code
org 100h

off equ -2
start:
mov ah, 2ah ;read date
mov bl, dl
int 21h
mov  ah,2bh

add dl,off
int  21h



mov  ah,4ch
int  21h
 

end start
Title: Re: How can I change the date on microscheme clock real time?
Post by: Gunther on February 08, 2013, 09:46:15 AM
Hi asm,

the code, which you've presented is 16 bit code and won't work; it'll hang, because your program will never come back to the operating system (DOS).

Gunther
Title: Re: How can I change the date on microscheme clock real time?
Post by: asm on February 08, 2013, 10:02:20 AM
Quote from: Gunther on February 08, 2013, 09:46:15 AM
Hi asm,

the code, which you've presented is 16 bit code and won't work; it'll hang, because your program will never come back to the operating system (DOS).

Gunther
i dont know what you are talking about. I execute this code on win7 x86. It is working awesome)