00001 #ifndef CGA_H 00002 #define CGA_H 00003 00004 #define CGA_ADDRESS_PORT 0x3d4 00005 #define CGA_DATA_PORT 0x3d5 00006 00007 #define CGA_HTR 0x00 //horizontal total register 00008 #define CGA_EHDR 0x01 //end horizontal display register 00009 #define CGA_SHBR 0x02 00010 #define CGA_EHBR 0x03 00011 #define CGA_SHRR 0x04 00012 #define CGA_EHRR 0x05 00013 #define CGA_VTR 0x06 00014 #define CGA_OR 0x07 00015 #define CGA_PRSR 0x08 00016 #define CGA_MSLR 0x09 00017 #define CGA_CSR 0x0a 00018 #define CGA_CER 0x0b 00019 #define CGA_SAHR 0x0c //start address high register 00020 #define CGA_SALR 0x0d //start address low register 00021 #define CGA_CLHR 0x0e //cursor location high register 00022 #define CGA_CLLR 0x0f //cursor location low register 00023 #define CGA_VRSR 0x10 00024 #define CGA_VRER 0x11 00025 #define CGA_VDER 0x12 00026 #define CGA_OR 0x13 00027 #define CGA_ULR 0x14 00028 #define CGA_SVBR 0x15 00029 #define CGA_EVB 0x16 00030 #define CGA_CMCR 0x17 00031 #define CGA_LCR 0x18 00032 00033 typedef struct{ 00034 U32 CursorPosition; 00035 U8 CharacterAttribute; 00036 }CGA_CONTROL; 00037 00038 extern CGA_CONTROL CgaCtrl; 00039 00040 void CgaInit(); 00041 void CgaCursorSet(); 00042 void CgaScrollUp(); 00043 void CgaCharPut(U8 CharValue); 00044 void CgaScreenClean(); 00045 void CgaBackSpace(); 00046 void CgaChangeLine(); 00047 00048 #endif
1.5.9