- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
SBTIMER.H
资源名称:泡泡龙源代码.zip [点击查看]
上传用户:junwei_58
上传日期:2007-05-15
资源大小:79k
文件大小:1k
源码类别:
其他智力游戏
开发平台:
Visual C++
- #ifndef SBTIMER_H
- #define SBTIMER_H
- //#pragma inline // Use only when TASM was installed.
- #include <stdio.h>
- #include <dos.h>
- #include <conio.h>
- #define OldTimerInt 103
- unsigned Counter;
- long unsigned HSec;
- void interrupt (*oldtim)(...);
- /*
- void SetTimer(void interrupt (*Rout)(...),unsigned Freq){
- int ICnt;
- asm cli;
- ICnt = (int)(1193180l/Freq);
- outportb(0x43,0x36);
- outportb(0x40,ICnt&255);
- outportb(0x40,ICnt>>8);
- oldtim = getvect(8);
- setvect(8,Rout);
- asm sti;
- }
- void RestoreTimer(){
- asm cli;
- outportb(0x43,0x36);
- outportb(0x40,0);
- outportb(0x40,0);
- setvect(8,oldtim);
- asm sti;
- }
- void interrupt NewTimer(...){
- struct REGPACK R;
- ++HSec;
- if(--Counter == 0){
- intr(OldTimerInt,&R);
- Counter = 100/18;
- }
- else outportb(0x20,0x20);
- } */
- #endif