I have done some programming with TASM in DOS several years ago. It involved capturing interrupts and using the printer port to turn the computer into a learning remote and wrote a program to turn the computer into a DVR. I also modified the program, using parts of it to run a stepper motor at varying speeds.
What I am looking for now is a way to adjust the computer's clock in small increments - like 1/10th of second by pressing two keys - one to set it ahead and another to set it back.
I use my computer to track the International Space Station with my telescope. Sometimes the computer's tracking is a little ahead or behind. Rather than using a joystick to try to correct larger errors, I'd like to be able to adjust the clock a bit to make adjustments.
Can one still use old methods with modern computers? I'm running XP.
Thanks.
6 replies to this topic
#1
Posted 06 December 2010 - 10:52 AM
|
|
|
#2
Posted 09 December 2010 - 04:13 PM
There are several things you can mean by "clock." Do you mean the system clock, the interrupt timer, or XP's clock?
sudo rm -rf /
#3
Posted 09 December 2010 - 08:55 PM
System clock. I found my old program I wrote 10 years ago and lifted some code out of that, but it isn't working. I ran it through Tasm Debug and the AX register comes up with zero when it should be holding a value.Here's what I'm trying
mov ah,2ch ;get current time
int 21h ;ch=hour cl=minutes dh=seconds, dl= 1/100 second
Then I add or subtract 10 to dl and then
mov ah,2dh ;set time
int 21h
Should that work?
Thanks.
It sounds like I need to be working on XP'S clock, maybe?
mov ah,2ch ;get current time
int 21h ;ch=hour cl=minutes dh=seconds, dl= 1/100 second
Then I add or subtract 10 to dl and then
mov ah,2dh ;set time
int 21h
Should that work?
Thanks.
It sounds like I need to be working on XP'S clock, maybe?
#4
Posted 10 December 2010 - 01:28 AM
This shouldn't run properly on modern Windows machines. In fact, your program should segfault; programs can't use interrupts like that in protected mode.
sudo rm -rf /
#5
Posted 10 December 2010 - 05:44 AM
Well, that answers my question. I'll abandon the idea.
Thanks.
My original program DID work with Windows 10 years ago. I used it along with an interface with an infrared LED to control my satellite receivers. That may have been Windows 98 back then.
Thanks.
My original program DID work with Windows 10 years ago. I used it along with an interface with an infrared LED to control my satellite receivers. That may have been Windows 98 back then.
#6
Posted 10 December 2010 - 03:32 PM
There may be a way to do it with the Windows API, although my searches proved fruitless. If you were to use the Windows API, you would need an assembler with the libraries and include files for it (I don't know whether TASM has these or not).
Latinamne loqueris?
#7
Posted 10 December 2010 - 04:19 PM
There's definitely a way to do it with WinAPI. It'd be a pain, though; for that you might as well write a C/C++ program to do it.
sudo rm -rf /
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









