微机原理程序题.docxVIP

  • 5
  • 0
  • 约1.34万字
  • 约 17页
  • 2020-11-17 发布于天津
  • 举报
将下面C语言程序的代码片段转换为功能等价的汇编语言代码片段, 其中sign与sinteger 均为双字变量。 if ( sinteger = = 0) sign = = 0; else If ( siteger 0) sign = 1; else sign = — 1; mov eax,sinteger mov edx,sign cmp eax,0 jnz L1 mov ebx,0 L1:cmp ebx,0 jl L2 mov ebx,1 L2:mov ebx,-1 将下面C语言程序的代码片段转换为功能等价的汇编语言代码片段,其中 ch1与caps均 为字节变量。 if (ch1 = a ch1 = z) caps= =0; if (ch1 = A ch1 = Z) caps= =1; mov ax,ch1 mov bx,caps cmp ax,a jb next cmp ax,z ja next mov bx,0 next:cmp ax,A jl done cmp ax,Z ja done done: 将下面C语言程序的代码片段转换为功能等价的汇编语言代码片段,其中 sum与i变量 均为双字变量。 sum=0; for ( i=1;i =100;i++) if ( i%2= =0) sum=sum+i; mov ecx,i mov ecx,1 .while(ecx=

文档评论(0)

1亿VIP精品文档

相关文档