00001 #ifndef SYSTEM_CGA_H 00002 #define SYSTEM_CGA_H 00003 00004 #define SYSTEM_CGA_ADDRESS_PORT 0x3d4 00005 #define SYSTEM_CGA_DATA_PORT 0x3d5 00006 00007 #define SYSTEM_CGA_HTR 0x00 //horizontal total register 00008 #define SYSTEM_CGA_EHDR 0x01 //end horizontal display register 00009 #define SYSTEM_CGA_SHBR 0x02 00010 #define SYSTEM_CGA_EHBR 0x03 00011 #define SYSTEM_CGA_SHRR 0x04 00012 #define SYSTEM_CGA_EHRR 0x05 00013 #define SYSTEM_CGA_VTR 0x06 00014 #define SYSTEM_CGA_OR 0x07 00015 #define SYSTEM_CGA_PRSR 0x08 00016 #define SYSTEM_CGA_MSLR 0x09 00017 #define SYSTEM_CGA_CSR 0x0a 00018 #define SYSTEM_CGA_CER 0x0b 00019 #define SYSTEM_CGA_SAHR 0x0c //start address high register 00020 #define SYSTEM_CGA_SALR 0x0d //start address low register 00021 #define SYSTEM_CGA_CLHR 0x0e //cursor location high register 00022 #define SYSTEM_CGA_CLLR 0x0f //cursor location low register 00023 #define SYSTEM_CGA_VRSR 0x10 00024 #define SYSTEM_CGA_VRER 0x11 00025 #define SYSTEM_CGA_VDER 0x12 00026 #define SYSTEM_CGA_OR 0x13 00027 #define SYSTEM_CGA_ULR 0x14 00028 #define SYSTEM_CGA_SVBR 0x15 00029 #define SYSTEM_CGA_EVB 0x16 00030 #define SYSTEM_CGA_CMCR 0x17 00031 #define SYSTEM_CGA_LCR 0x18 00032 00033 typedef struct{ 00034 U32 CursorPosition; 00035 U8 CharacterAttribute; 00036 }SYSTEM_CGA_CONTROL; 00037 00038 extern SYSTEM_CGA_CONTROL SystemCgaCtrl; 00039 00040 void SystemCgaInit(); 00041 void SystemCgaCursorSet(); 00042 void SystemCgaScrollUp(); 00043 void SystemCgaCharPut(U8 CharValue); 00044 void SystemCgaScreenClean(); 00045 void SystemCgaBackSpace(); 00046 void SystemCgaChangeLine(); 00047 00048 #endif
1.5.9