본문 바로가기
기술자료/FileFormat

PE File Code & Data Section Read Function : load()

by 와이즈캣 2013. 9. 30.
728x90
반응형

아래는 전역 변수 선언임.

static
 unsigned char   *mem;            // 동적할당의 시작 위치
static unsigned char   *mem_end;        // 동적할당의 끝 위치
static unsigned char   *code;           // 프로그램 저장공간의 시작 위치 - Code
static unsigned char   *data;           // 프로그램 저장공간의 시작 위치 - Data
static unsigned char   Load_Flag;       // 프로그램이 로드 유무 표시
static unsigned char   Display_Flag;    // 메모리 값 출력시 계속해서 출력하는
                                           // 경우를 위해
static int               File_DS;          // 저수준 파일의 데스크립터
static context           stat_old;         // 기존의 레지스터 값 저장 



LOAD.pdf

1. load()함수에 아래 변수를 추가 할 것!!!

  int         Total_Read=0;


2. 79번 라인의 else는 아래와 같이 작성할 것!!!

  else
  {
    Total_Read = Total_Read + Read_Num;
    Read_Num = 
  }


3. 91번 라인의 else는 아래와 같이 작성할 것!!!

  else
  {
    Total_Read = Total_Read + Read_Num;
    File_DS   = 0;
    Load_Flag = 1;
    printf("파일을 성공적으로 메모리에 적재하였습니다.\n");
    printf("읽어 들인 파일의 크기는 [%d]Bytes입니다.\n\n", Total_Read);
  }

728x90

'기술자료 > FileFormat' 카테고리의 다른 글

ID3v2 분석  (0) 2009.10.09
MP3 ID3 tag 분석  (0) 2009.10.09