摘要: 在代码段中用“;”表示注释汇编代码如下:dp@dp:~ % cat test1.s.section .rodata output: .asciz "the number is %d\n".section .data value: .int 0,0,0,0,0,0,0,0,0,0.section .text.globl mainmain: movl $0,%ecx loopset:;基地址(存在寄存器中的偏移地址,存在寄存器中的数据元素索引,存在寄存器中的数据元素大小) movl %ecx,value(,%ecx,4) inc %ecx cmpl $10,%ecx jne l 阅读全文
posted @ 2014-02-20 10:09 刘俊鹏123 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 判断前缀是否和某个字符串相同,不多说了直接上代码,uva的字符模拟终于要结束了啊啊,acm之路还很长希望自己和大家能坚持下去。[cpp] view plaincopy#include #include char isprefix(const char s[][12],int n)//判断前缀 { for(int i=0;i<n;i++) for(int j=i+1;j<n;j++) { char ch1[12]={'\0'},ch2[12]={'\0'}; int len=strlen(s[i])<strlen(s[j])?strlen(s[i 阅读全文
posted @ 2014-02-20 10:03 刘俊鹏123 阅读(252) 评论(0) 推荐(0) 编辑
摘要: const修饰指针的说明:const int *A; //const修饰指向的对象,A可变,A指向的对象不可变 int const *A; //const修饰指向的对象,A可变,A指向的对象不可变 int *const A; //const修饰指针A, A不可变,A指向的对象可变 const int *const A;//指针A和A指向的对象都不可变 饮品店加盟www.qidouzl.com32位系统下,int、long、long long、__int64所占字节数和取值范围 字节数 char: 1字节(8位) int: 4字节 (32位,取值范围 -2^31 ~ 2^31-1) unsign 阅读全文
posted @ 2014-02-20 10:02 刘俊鹏123 阅读(196) 评论(0) 推荐(0) 编辑
重生之大文豪