• 2022-10-31 问题

    第2题中的caller函数对应的机器级代码如下:[br][/br] 1 pushl %ebp 2 movl %esp, %ebp 3 subl $24, %esp 4 movl $100, -12(%ebp) 5 movl $200, -8(%ebp) 6 movl -8(%ebp), %eax 7 movl %eax, 4(%esp) 8 movl -12(%ebp), %eax 9 movl %eax, (%esp) 10 call add 11 movl %eax, -4(%ebp) 12 movl -4(%ebp), %eax 13 leave 14 ret 假定caller的调用过程为P,对于上述指令序列,以下叙述中错误的是( )。 A: 第2条指令使BEP内容指向caller栈帧的底部 B: 从上述指令序列可看出,caller函数没有使用被调用者保存寄存器 C: 第1条指令将过程P的EBP内容压入caller栈帧 D: 第3条指令将栈指针ESP向高地址方向移动,以生成当前栈帧

    第2题中的caller函数对应的机器级代码如下:[br][/br] 1 pushl %ebp 2 movl %esp, %ebp 3 subl $24, %esp 4 movl $100, -12(%ebp) 5 movl $200, -8(%ebp) 6 movl -8(%ebp), %eax 7 movl %eax, 4(%esp) 8 movl -12(%ebp), %eax 9 movl %eax, (%esp) 10 call add 11 movl %eax, -4(%ebp) 12 movl -4(%ebp), %eax 13 leave 14 ret 假定caller的调用过程为P,对于上述指令序列,以下叙述中错误的是( )。 A: 第2条指令使BEP内容指向caller栈帧的底部 B: 从上述指令序列可看出,caller函数没有使用被调用者保存寄存器 C: 第1条指令将过程P的EBP内容压入caller栈帧 D: 第3条指令将栈指针ESP向高地址方向移动,以生成当前栈帧

  • 2022-10-31 问题

    在第3题中的caller函数对应的机器级代码表示如下: 1 pushl %ebp 2 movl %esp, %ebp[br][/br] 3 subl $24, %esp[br][/br] 4 movl $100, -12(%ebp)[br][/br] 5 movl $200, -8(%ebp)[br][/br] 6 movl -8(%ebp), %eax[br][/br] 7 movl %eax, 4(esp)[br][/br] 8 movl -12(%ebp), %eax[br][/br] 9 movl %eax, (%esp)[br][/br] 10 call add[br][/br] 11 movl %eax, -4(%ebp)[br][/br] 12 movl -4(%ebp), %eax[br][/br] 13 leave[br][/br] 14 ret 假定caller的调用过程是P,对于上述指令序列,以下叙述中错误的是()。 A: 第1条指令将过程P的EBP内容压入caller栈帧 B: 第2条指令使EBP内容指向caller栈帧的底部 C: 第3条指令将栈指针ESP向高地址方向移动,以生成当前栈帧 D: 从上述指令序列可以看出,caller函数没有使用被调用者保持寄存器

    在第3题中的caller函数对应的机器级代码表示如下: 1 pushl %ebp 2 movl %esp, %ebp[br][/br] 3 subl $24, %esp[br][/br] 4 movl $100, -12(%ebp)[br][/br] 5 movl $200, -8(%ebp)[br][/br] 6 movl -8(%ebp), %eax[br][/br] 7 movl %eax, 4(esp)[br][/br] 8 movl -12(%ebp), %eax[br][/br] 9 movl %eax, (%esp)[br][/br] 10 call add[br][/br] 11 movl %eax, -4(%ebp)[br][/br] 12 movl -4(%ebp), %eax[br][/br] 13 leave[br][/br] 14 ret 假定caller的调用过程是P,对于上述指令序列,以下叙述中错误的是()。 A: 第1条指令将过程P的EBP内容压入caller栈帧 B: 第2条指令使EBP内容指向caller栈帧的底部 C: 第3条指令将栈指针ESP向高地址方向移动,以生成当前栈帧 D: 从上述指令序列可以看出,caller函数没有使用被调用者保持寄存器

  • 2022-10-31 问题

    第22题中caller函数对应的机器级代码如下:1 pushl %ebp2 movl %esp, %ebp3 subl $24, %esp4 movl $100, -12(%ebp)5 movl $200, -8(%ebp)6 movl -8(%ebp), %eax7 movl %eax, 4(%esp)8 movl -12(%ebp), %eax9 movl %eax, (%esp)10 call add11 movl %eax, -4(%esp)12 movl -4(%ebp), %eax13 leave14 ret假定caller的调用过程为P,对于上述指令序列,以下叙述中错误的是()。 A: 第1条指令将过程P的EBP内容压入caller栈帧 B: 第2条指令使EBP内容指向caller栈帧的底部 C: 第3条指令将栈指针ESP向高地址方向移动,以生成当前栈帧 D: 从上述指令序列可看出,caller函数没有使用被调用者保存寄存器

    第22题中caller函数对应的机器级代码如下:1 pushl %ebp2 movl %esp, %ebp3 subl $24, %esp4 movl $100, -12(%ebp)5 movl $200, -8(%ebp)6 movl -8(%ebp), %eax7 movl %eax, 4(%esp)8 movl -12(%ebp), %eax9 movl %eax, (%esp)10 call add11 movl %eax, -4(%esp)12 movl -4(%ebp), %eax13 leave14 ret假定caller的调用过程为P,对于上述指令序列,以下叙述中错误的是()。 A: 第1条指令将过程P的EBP内容压入caller栈帧 B: 第2条指令使EBP内容指向caller栈帧的底部 C: 第3条指令将栈指针ESP向高地址方向移动,以生成当前栈帧 D: 从上述指令序列可看出,caller函数没有使用被调用者保存寄存器

  • 2022-10-31 问题

    IA-32中指令“movl 8(%ebp),%edx”的功能是( )。 A: M[R[ebp]+8] B: R[edx] C: R[ebp]+8 D: R[edx]

    IA-32中指令“movl 8(%ebp),%edx”的功能是( )。 A: M[R[ebp]+8] B: R[edx] C: R[ebp]+8 D: R[edx]

  • 2022-10-30 问题

    leave指令用于撤销函数调用堆栈,等价于以下两条指令:<br/>movl %ebp,%esp<br/>popl %ebp

    leave指令用于撤销函数调用堆栈,等价于以下两条指令:<br/>movl %ebp,%esp<br/>popl %ebp

  • 2022-10-30 问题

    enter指令负责建立当前函数堆栈,等价于以下两条指令:<br/>pushl %ebp<br/>movl %esp,%ebp

    enter指令负责建立当前函数堆栈,等价于以下两条指令:<br/>pushl %ebp<br/>movl %esp,%ebp

  • 2022-10-30 问题

    (接上题)假设set函数在开始时首先使用两条指令“push %ebp”和“mov %esp,%ebp”将其栈帧基址保存于寄存器ebp中,则下列哪条/组指令将函数的字符串参数中的第2个字符的ASCII编码保存到al寄存器中?() A: movb 0xd(%ebp), %al B: movl 0xd(%ebp), %eaxmovb (%eax), %al C: movl 0xc(%ebp), %eaxmovb 0x1(%eax), %al D: lea 0xc(%ebp), %eaxmovb 0x1(%eax), %al

    (接上题)假设set函数在开始时首先使用两条指令“push %ebp”和“mov %esp,%ebp”将其栈帧基址保存于寄存器ebp中,则下列哪条/组指令将函数的字符串参数中的第2个字符的ASCII编码保存到al寄存器中?() A: movb 0xd(%ebp), %al B: movl 0xd(%ebp), %eaxmovb (%eax), %al C: movl 0xc(%ebp), %eaxmovb 0x1(%eax), %al D: lea 0xc(%ebp), %eaxmovb 0x1(%eax), %al

  • 2022-10-31 问题

    与下面两条指令等价的指令是(): pushl %ebp movl %esp, %ebp A: . enter; B: . leave; C: . ret; D: . popl

    与下面两条指令等价的指令是(): pushl %ebp movl %esp, %ebp A: . enter; B: . leave; C: . ret; D: . popl

  • 2022-10-31 问题

    IA-32 中指令 “movl 8(%ebp), %edx"的功能是 ____? A: M[R[ebp]+8]←R[edx] B: R[edx]←M[R[ebp]+8] C: R[ebp]+8←R[edx] D: R[edx]←R[ebp]+8

    IA-32 中指令 “movl 8(%ebp), %edx"的功能是 ____? A: M[R[ebp]+8]←R[edx] B: R[edx]←M[R[ebp]+8] C: R[ebp]+8←R[edx] D: R[edx]←R[ebp]+8

  • 2022-10-31 问题

    movl 0xc(%ebp),%eax这条指令的作用等价于eax=*(int32_t*)(ebp+12)。

    movl 0xc(%ebp),%eax这条指令的作用等价于eax=*(int32_t*)(ebp+12)。

  • 1 2 3 4 5 6 7 8 9 10