📄 detect.h
字号:
/* detect.h : FritzOS Hardware Dectection Header File For The FritzOS C++ Kernel Copyright (C) 2002 Tom Fritz * This program is a part of the FritzOS kernel, and may be freely * copied under the terms of the GNU General Public License (GPL), * version 2, or at your option any later version. For more info, look at the COPYING file.*/// Defines:// Define information to let the compiler know detect.h was included#ifndef DETECT_H#define DETECT_H // Was included// Defines for seeing if there's a color or mono video card#define MONOCARD 0 // There's a mono card - 2 colors#define COLORCARD 1 // There's a color card// voids:int DetectVidCard();////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Example: int detectifvid = DetectVidCard(); // See if there's a video card...if detectifvid ==// COLORCARD, then there is a color card, else if it's MONOCARD, it's a mono card.int DetectVidCard(){ int detect; // Int used for returning if there's a mono or color card char colormono = ( * ( USHORT * ) 0x410 ) & 0x30; // The memory location for detecting the card // type // colormono will contain 0x00 or 0x20 for color, 0x30 for mono. // Check to see if colormono is returns a mono card if ( colormono == 0x30 ) colormono = MONOCARD; // Yes, using a mono card // Check to see if colormono returns a color card else if ( colormono == 0x00 || 0x20 ) colormono = COLORCARD; // Using a color card return colormono;}#endif // End of included file// End of detect.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -