?? tables6.cpp
字號:
// tables6.cpp : Defines the entry point for the console application.
//
//#include "stdafx.h"
#include<stdio.h>
#include<stdlib.h>
#define XTIME(b) (b<<1)^((b&0x80)?0x1B:0x00)
unsigned char a=0x0b;
void main()
{
char * fn_out;
fn_out=(char *)malloc(36);
FILE * fp_out;
printf("enter the filename .\n");
scanf("%s",fn_out);
fp_out=fopen(fn_out,"wb");//二進制格式打開文件
if(fp_out==NULL)
{
printf("This file %s can not open!\n",fn_out);
exit(1);
}
unsigned char b;
unsigned char c;
int i;
int j;
unsigned char temp;
for(b=0x00,j=1;(b<=0xff)&&(j<=256);b++,j++)
{
temp=0x00;
c=b;
for(i=0x01;(i<=0x80)&&(i<=a);i=i<<1,c=XTIME(c))
{
if(a&i)
{
temp=temp^c;
}
}
fprintf(fp_out,"0x%x, ",temp);
if(j%16==0)
{
fprintf(fp_out,"\n");
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -