摘要: 1.硬盘的磁头(盘面)是从数字(0)开始编号的;每个盘面磁道是从数字(0)开始编号的;每磁道/柱面上的扇区是从数字(1)开始编号的,主引导扇区的位置(0)面(0)道(1)扇区。2.如果希望处理器从当前位置转移到物理地址0xc5030处开始执行,可以使用下面哪些指令(多选):A. jmp 0xc000:0x5030 B. jmp 0xc500:0x0030C. jmp 0xc503:0x0000 D.jmp 0xbb00:0xa030答案:ABCD 阅读全文
posted @ 2014-01-16 00:26 ASMLearner 阅读(208) 评论(0) 推荐(0) 编辑
摘要: DRAM(Dynamic Random Access Memory,DRAM)访问地址空间:00000-9FFFF;ROM (Read Only Memory,ROM) 访问地址空间:F0000-FFFFF;因为8086加电通电或者复位时 CS=0xFFFF, IP=0x0000,位于物理地址0xFFFF0;处理器取指令执行的自然顺序是从内存的低地址往高地址推进。如果从0xFFFF0开始执行,离1MB内存的顶端(物理地址0xFFFFF) 只有16个字节的长度,一旦IP寄存器的值超过0x000F,比如 IP=0x0011,那么,它与CS一起形成的物理地址将因为溢出而变成0x00001,将绕到1M 阅读全文
posted @ 2014-01-16 00:06 ASMLearner 阅读(2537) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #define WrdIn 1 3 #define WrdOut 0 4 main() 5 { 6 int c,nl,nw,nc,state; 7 state=WrdOut; 8 nl=nw=nc=0; 9 while ( (c=getchar()) !=EOF)10 {11 ++nc;12 if(c=='\n')13 ++nl;14 if(c==' ' || c=='\n' || c== '\t')15 state = WrdOu... 阅读全文
posted @ 2014-01-04 00:52 ASMLearner 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 int main(void) 4 { 5 int i; 6 for(i=1;i<=20;i++) 7 { 8 printf("%10d",1+rand()%6); 9 if(i%5==0)10 {11 printf("\n");12 }13 }14 } 阅读全文
posted @ 2013-12-30 22:42 ASMLearner 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 int main(void) 3 { 4 float x,y,z; 5 printf("Please input the x,y,z: "); 6 scanf("%f%f%f",&x,&y,&z); 7 if ((x+y)>z && (x+z)>y && (y+z)>x ) 8 printf("YES"); 9 else 10 printf("NO!");11 return 0;12 } 阅读全文
posted @ 2013-12-06 16:27 ASMLearner 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 int main(void) 3 { 4 int x,i,j; 5 printf("Please input the length(1-20): \n"); 6 scanf("%d",&x); 7 for (i=1;i<=x;i++) 8 printf("* "); 9 printf("\n");10 for (i=1;i<=x-2;i++)11 {12 printf("* ");13 for (j=1;j<=x-2;j++)14 {15 .. 阅读全文
posted @ 2013-12-06 00:26 ASMLearner 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 格式如下:N 10*N 100*N 1000*N1 10 100 10002 20 200 2000...............................................10 100 1000 10000 1 #include 2 int main(void) 3 { 4 int n=1; 5 printf("N 10*N 199*N 1000*N\n\n"); 6 while(n<=10) 7 { 8 printf("%d\t%d\t%d\t%d\t\n",n,n*1... 阅读全文
posted @ 2013-12-05 23:06 ASMLearner 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 要求:使用到变量:counter:一个计数量为10的计数器(例如,记录已经输入了多少个数并确定何时所有10个数都已经比较处理过. number: 当前输入数. largest:当前最大数.initialize largest to zerolnitialize counter to oneInput the first numberwhile counter less thanor equal to ten set largest to number Input the next number if largest less than number setlargest to nu... 阅读全文
posted @ 2013-12-05 22:55 ASMLearner 阅读(577) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 int main(void) 3 { 4 float gallons=0,miles,TotGallons=0,TotMiles=0; 5 while (gallons!=-1) 6 { 7 printf("Enter the gallons used (-1 to end):"); 8 scanf("%f",&gallons); 9 10 if(gallons!=-1)11 {12 printf("Enter the miles driven:");13... 阅读全文
posted @ 2013-12-05 16:48 ASMLearner 阅读(716) 评论(0) 推荐(0) 编辑
摘要: 1 #if __STDC__ 2 #define _Cdecl 3 #else 4 #define _Cdecl cdecl 5 #endif 6 7 #if !defined(__STDIO_DEF_) 8 #define __STDIO_DEF_ 9 10 #ifndef _SIZE_T 11 #define _SIZE_T 12 typedef unsigned size_t; 13 #endif 14 #ifndef NULL 15 # if defined(__TINY__) || defined(__SMALL__) || defined(__... 阅读全文
posted @ 2013-11-25 23:32 ASMLearner 阅读(380) 评论(0) 推荐(0) 编辑