|
楼主 |
发表于 2012-8-11 22:28:45
|
显示全部楼层
- #include "fxlib.h"
- #include "stdarg.h"
- const unsigned char mem[9000]={0};
- unsigned char mem2[100];
- unsigned char *p,*p2,*p4;
- int (*p3)();
- int fun()
- {
- ;
- }
- int printf7(int x,int y,char * msg,...)
- {
- unsigned char c1,c2;
- unsigned char buf[128];
- va_list arg_list;
- va_start (arg_list,msg);
- vsprintf ((char*)buf,msg,arg_list);
- va_end (arg_list);
-
- PrintXY (x,y,buf,0);
- }
- int AddIn_main(int isAppli, unsigned short OptionNum)
- {
- unsigned int key;
- Bdisp_AllClr_DDVRAM();
- p=&mem[0];
- p2=&mem2[0];
- p3=fun;
- p4=(unsigned char*)"hello,world!";
- p[0]=1;p[5127]=2;p[5128]=3;p[5129]=4;
- printf7(0,0,"%x,%x,%x",p[0],p[5127],p[5128]);
- printf7(0,10,"%x,%x,%x",p,&p[5127],&p[5128]);
- printf7(0,20,"%x,%x,%x",p2,p3,p4);
- while(1){
- GetKey(&key);
- }
- return 1;
- }
复制代码 Output:- 0,0,0
- 3033d4,3047db,3047dc
- 8100004,30020c,3056fc
复制代码 你有什么感悟? |
|