摘要: .bss .data .text 区别BSS段在采用段式内存管理的架构中,BSS段(bss segment)通常是指用来存放程序中未初始化的全局变量的一块内存区域。BSS是英文Block Started by Symbol的简称。BSS段属于静态内存分配。数据段在采用段式内存管理的架构中,数据段(data segment)通常是指用来存放程序中已初始化的全局变量的一块内存区域。数据段属于静态内存分配。代码段在采用段式内存管理的架构中,代码段(text segment)通常是指用来存放程序执行代码的一块内存区域。这部分区域的大小在程序运行前就已经确定,并且内存区域属于只读。在代码段中,也有可能包 阅读全文
posted @ 2013-10-09 20:27 阳光VS心情 阅读(678) 评论(0) 推荐(1) 编辑
摘要: 解答:int checkCPU(){ union w { int a; char b; } c; c.a = 1; return (c.b == 1); } 剖析: 嵌入式系统开发者应该对Little-endian和Big-endian模式非常了解。采用Little-endian模式的CPU对操作数的存放方式是从低字节到高字节,而Big-endian模式对操作数的存放方式是从高字节到低字节。例如,16bit宽的数0x1234在Little-endian模式CPU内存中的存放方式(假设从地址0x4000开始存放)为:内存地址存放内容0x40000x340x40010x... 阅读全文
posted @ 2013-10-09 19:44 阳光VS心情 阅读(786) 评论(0) 推荐(0) 编辑
摘要: SYNOPSIS #include #include #include int open(const char *pathname, int flags); int open(const char *pathname, int flags, mode_t mode); int creat(const char *pathname, mode_t mode);Given apathnamefor a file, open() returns a file descriptor,The argumentflagsmust include one of the follo... 阅读全文
posted @ 2013-10-09 16:03 阳光VS心情 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-10-09 15:07 阳光VS心情 阅读(134) 评论(0) 推荐(0) 编辑
摘要: #include FILE *fopen(const char *path, const char *mode);The fopen() function opens the file whose name is the string pointed toby path and associates a stream with it. int fclose(FILE *fp);打开标准I/O流的mode参数SYNOPSIS #include size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream); si... 阅读全文
posted @ 2013-10-09 14:53 阳光VS心情 阅读(188) 评论(0) 推荐(0) 编辑