⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gettix.c

📁 C.Game.Programming.For.Dummies.原码
💻 C
字号:
#include <stdio.h>
#include <dos.h>

#define CLOCK 0x1a  //BIOS clock tix

unsigned int gettix(void);

void main()
{
    unsigned int x;

    x = gettix();       //get tick count

    printf("The tick count is %u.\n",x);
}

unsigned int gettix(void)
{
    union REGS regs;
    struct SREGS sregs;

    regs.h.ah=0x00;   //Read the clock
    int86x(CLOCK,&regs,&regs,&sregs);
    return(regs.x.dx);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -