怎样让系统时间走的快一点?

vivid_fly 2003-08-24 11:27:14
怎样让系统时间走的快一点?
...全文
67 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
jacket1127 2003-08-24
  • 打赏
  • 举报
回复
你要走快点干嘛呀,要早点下班吗?
楼上说的是
mychris 2003-08-24
  • 打赏
  • 举报
回复
有多种方法喽,
一种是直接手工去调啦
一种听说电池电压较高会走得快点,未经过验证,呵呵~~
...
yishao 2003-08-24
  • 打赏
  • 举报
回复
叫人开发一个软件即可
zhllwarez 2003-08-24
  • 打赏
  • 举报
回复
//“兄弟变速器”修改系统时钟频率的部分代码

// File name : SetClock.cpp
// Function1 : SetClock9x(int)
// Function2 : SetClockNT(int)
// Chu Rui 2001.3.1

#include "stdafx.h"
#include "ntport.h"

#define FREE_INT_NO 5

void Ring0()
{ //在Windows9x下进入ring0后进行的操作
__asm
{
cli
mov al,34h
out 43h,al //写入8253控制寄存器,设置写0号定时器
mov ax,bx
out 40h,al //写定时值低位
mov al,ah
out 40h,al //写定时值高位
sti
iretd;
}
}

void SetClockNT(int freq)
{ //NT下的操作
//这里使用了NT Port库
Outport(0x43,0x34); //写入8253控制寄存器,设置写0号定时器
Outport(0x40,freq&0xff); //写定时值低位
Outport(0x40,(freq>>8)&0xff); //写定时值高位
}

void SetClock9x(int freq)
{
union Function_Pointer
{
void (*pointer)();
char bytes[sizeof(void *)];
}OldIntAddress,NewIntAddress;

int IDTAddress; //IDT表基地址
int IDTItemAddress; //要修改的中断门所在地址
char *Pointer; //要修改的中断门所在地址,指针形式

__asm
{
push eax
sidt [esp-2]
pop eax
mov IDTAddress,eax //得到IDT表基地址
}

IDTItemAddress=FREE_INT_NO*8+IDTAddress;
Pointer=(char *)IDTItemAddress;
NewIntAddress.pointer=Ring0;

OldIntAddress.bytes[0]=Pointer[0];
OldIntAddress.bytes[1]=Pointer[1];
OldIntAddress.bytes[2]=Pointer[6];
OldIntAddress.bytes[3]=Pointer[7]; //保存旧的中断门

Pointer[0]=NewIntAddress.bytes[0];
Pointer[1]=NewIntAddress.bytes[1];
Pointer[6]=NewIntAddress.bytes[2];
Pointer[7]=NewIntAddress.bytes[3]; //设置新的中断门

__asm
{
mov ebx,freq
int FREE_INT_NO //产生中断,进入ring0
}

Pointer[0]=OldIntAddress.bytes[0];
Pointer[1]=OldIntAddress.bytes[1];
Pointer[6]=OldIntAddress.bytes[2];
Pointer[7]=OldIntAddress.bytes[3]; //恢复旧的中断门
}

zhllwarez 2003-08-24
  • 打赏
  • 举报
回复
只知道一些编程实现思路,就是让自己的程序进入ring0级修改系统时钟中断:
1.创建一个内存映射,把自己的代码映射到0x80000000以上的地方,在Win9x下,这块虚存是所有进程共享的。
2.先得到局部描述符表的地址,然后利用这张表修改代码段的特权级。
3.用局部描述符表创建一个调用门,在x86的保护模式下要进入ring0必须通过门来进行,CIH是用中断门完成的,这里用调用门完成,异曲同工。
4.保存几个关键函数前六个字节,改为一条跳转指令,跳到自己已经映射到高端的代码。
5.发生函数调用时进入自己的代码,通过调用门进入ring0,恢复函数开头的几个字节,修改返回值。


另外,一些ring0级的系统调试工具(如TR运行时可以让时钟停止)的编写方法可以借鉴,具体实现方法我也不会,可以到网上查找一下ring0级程序编写技巧看看

9,505

社区成员

发帖
与我相关
我的任务
社区描述
Windows专区 安全技术/病毒
社区管理员
  • 安全技术/病毒社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧