systemcga.c File Reference

#include "includes.h"

Go to the source code of this file.

Functions

void SystemCgaInit (void)
void SystemCgaCursorSet (void)
void SystemCgaScrollUp (void)
void SystemCgaCharPut (U8 CharValue)
void SystemCgaScreenClean (void)
void SystemCgaChangeLine (void)
void SystemCgaStringPrint (U8 *pString)

Variables

SYSTEM_CGA_CONTROL SystemCgaCtrl


Function Documentation

void SystemCgaChangeLine ( void   ) 

Definition at line 69 of file systemcga.c.

00069                               {
00070     U8 i;
00071     
00072     i=0;
00073     while(SystemCgaCtrl.CursorPosition>160){
00074         SystemCgaCtrl.CursorPosition=SystemCgaCtrl.CursorPosition-160;
00075         i++;    
00076     }
00077     SystemCgaCtrl.CursorPosition=(i+1)*160;
00078     if(SystemCgaCtrl.CursorPosition==4000) SystemCgaScrollUp(); 
00079 }

void SystemCgaCharPut ( U8  CharValue  ) 

Definition at line 47 of file systemcga.c.

void SystemCgaCursorSet ( void   ) 

void SystemCgaInit ( void   ) 

void SystemCgaScreenClean ( void   ) 

Definition at line 59 of file systemcga.c.

00059                                {
00060     U32 i;
00061     
00062     for(i=0;i<4000;i=i+2){
00063         SystemCgaByteWrite(i,' ');
00064         SystemCgaByteWrite(i+1,SystemCgaCtrl.CharacterAttribute);
00065     }
00066     SystemCgaCtrl.CursorPosition=0;
00067 }

void SystemCgaScrollUp ( void   ) 

Definition at line 32 of file systemcga.c.

00032                             {
00033     U32 i;
00034     U8 ByteValue;
00035     
00036     for(i=0;i<3840;i++){
00037         ByteValue=SystemCgaByteRead(i+160);
00038         SystemCgaByteWrite(i,ByteValue);
00039     }
00040     for(i=3840;i<4000;i=i+2){
00041         SystemCgaByteWrite(i,' ');
00042         SystemCgaByteWrite(i+1,SystemCgaCtrl.CharacterAttribute);
00043     }
00044     SystemCgaCtrl.CursorPosition=3840;
00045 }

void SystemCgaStringPrint ( U8 pString  ) 

Definition at line 81 of file systemcga.c.

00081                                       {
00082     while(*pString!=0){
00083         if(*pString==0x0a) SystemCgaChangeLine();
00084         else if(*pString==0x0d); // 0x0a 0x0d is change line ,too.
00085         else SystemCgaCharPut(*pString);
00086         pString++;
00087     }
00088     SystemCgaCursorSet();
00089 }


Variable Documentation

Definition at line 12 of file systemcga.c.


Generated on Sat Apr 10 23:28:08 2010 for 80X86 MULTI-TASKING OPERATION SYSTEM by  doxygen 1.5.9