APP下载

用汇编语言解析C/C++函数调用中值传递、指针传递和引用传递的内在机制

2012-04-29火善栋杨旭东

计算机时代 2012年9期
关键词:汇编语言堆栈指针

火善栋 杨旭东

摘要: 为了让学生通过对汇编语言的学习加深对计算机内部原理的理解,借助汇编语言低级化的特点,详细分析了C/C++函数调用中值传递、指针传递和引用传递的内在实现机制。

关键词: 汇编语言; 函数调用; 指针; 引用; 堆栈

中图分类号:N文献标志码:A 文章编号:1006-8228(2012)09-49-02

Via assemble language to catch on mechanism of value transmit, pointer transmit

and reference transmit in C/C++ function calling

Huo Shandong, Yang Xudong

(1. Chongqing three gorges university, Chongqing 404000, China; 2. Chongqing safety technology profession college)

Abstract: Since the assemble language is an important machine language of facing computer hardware directly, it can help to better understand the principle of computer. The characteristic of assemble language is introduced and it is explained in the paper how to realize value transmit, pointer transmit and reference transmit in the computer.

Key words: assemble language; function calling; pointer; reference; stack

猜你喜欢

汇编语言堆栈指针
高等学校计算机专业课程教学改革实践——以汇编语言与接口技术课程为例
汇编语言与C语言的混合程序设计技术研究
嵌入式软件堆栈溢出的动态检测方案设计*
提高《汇编语言程序设计》教学效率的思考与实践
为什么表的指针都按照顺时针方向转动
基于堆栈自编码降维的武器装备体系效能预测
基于改进Hough变换和BP网络的指针仪表识别
试论汇编语言与C语言的混合程序设计技术
ARM Cortex—MO/MO+单片机的指针变量替换方法
一种用于分析MCS-51目标码堆栈深度的方法