메뉴 건너뛰기

임베디드시스템

//dumpcode.h

//헤더파일 입니다.

 

 void printchar(unsigned char c){ 

if(isprint(c))

  printf("%c",c);

else

  printf(".");

}

 

 

void dumpcode(unsigned char *buff, int len){

  int i;

  for(i=0;i<len;i++){

  if(i%16==0)

  printf("0x%08x ",&buff[i]);

 

  printf("%02x ",buff[i]);

  if(i%16-15==0){

  int j;

  printf(" ");

  for(j=i-15;j<=i;j++)

  printchar(buff[j]);

  printf("\n");

  }

  }

 

if(i%16!=0){

  int j;

  int spaces=(len-i+16-i%16)*3+2;

 

  for(j=0;j<spaces;j++)

  printf(" ");

 

  for(j=i-i%16;j<len;j++)

  printchar(buff[j]);

}

  

제목 날짜
임베디드 시스템 실습 5 file 2025.12.15
임베디드 실습 4 file 2025.11.13
5-1장 강의자료 file 2025.11.03
임베디드 실습 3 file 2025.10.28
임베디드시스템 실습2 file 2025.10.22
6장 강의자료 file 2025.10.17
10월 14일 강의자료 2025.10.14
3장 강의자료 file 2025.09.29
1장 2장 강의자료 file 2025.09.12
임베디드시스템 실습 1 file 2025.09.09
0장 강의자료 file 2025.08.29
태그 목록
위로