计算机系统:递归子程序与栈帧实现.pdfVIP

  • 0
  • 0
  • 约9.11千字
  • 约 9页
  • 2026-01-15 发布于北京
  • 举报

计算机系统:递归子程序与栈帧实现.pdf

Overview

ComputerSystemsStackframe

Lecture15Recursivesubroutine

Recursivemethodforfactorialfunctionin

Java

Implementationofrecursivefunctioninthe

assemblylanguage

1

Summary:ascenarioofnested

Stackframe

subroutinecalls

Theareaofthestackwhichholdsallthe

datarelatedtoonecallofasubroutine.

Thedataincludes:

–Parametersofthesubroutine.

–Returnaddress.

–Oldstackpointercontents(EBP)

–Localvariab.

definitions

edures)

-1).

ntotwoparts

eachpart

6

theassembly

tobeusedinthe

procedure:

//inputfromtwotopvaluesonthestack

//popavaluefromthestacktoeax

//

文档评论(0)

1亿VIP精品文档

相关文档