首页 | 本学科首页   官方微博 | 高级检索  
     检索      

Linux平台C/C++和汇编混合编程
引用本文:郝丽花,张世禄,张杨军.Linux平台C/C++和汇编混合编程[J].西华师范大学学报(哲学社会科学版),2004,25(1):104-108.
作者姓名:郝丽花  张世禄  张杨军
作者单位:[1]西华师范大学计算机科学系,四川南充637002 [2]西华师范大学数学系,四川南充637002 [3]山西孝义招生办微机室,山西孝义032300
摘    要:Linux的核心代码大部分是用C语言编写的,不可避免的其中还有一部分是用汇编语言写成的.有些汇编语言代码是利用gcc的内嵌语句直接嵌在C语言程序中的;还有一些则是写在汇编源程序中的,特别是Linux的启动代码部分,文章介绍了在Linux的gcc/g 环境下,C/C 程序中如何内嵌汇编代码;分析了汇编源程序如何与调用它的C/C 程序接口。

关 键 词:Linux  C++  编程  内嵌汇编语言  参数传递  换名  程序设计

C/C++ Language and Assemble Language Combination Programming Based on Linux
HAO Li-hua,ZHANG Shi-lu,ZHANG Yang-jun.C/C++ Language and Assemble Language Combination Programming Based on Linux[J].Journal of China West Normal University:Natural Science Edition,2004,25(1):104-108.
Authors:HAO Li-hua  ZHANG Shi-lu  ZHANG Yang-jun
Institution:HAO Li-hua~1,ZHANG Shi-lu~2,ZHANG Yang-jun~3
Abstract:Many kernel codes of Linux operating system are written in C language. But it is inevitable that there are still partial codes written in assemble language. Some assemble language codes are directly embedded in C language programs by embedded sentence. Some codes, especially the startup codes of Linux, are written in assemble language source programs. In order to help those friends that are interested in the kernel codes of Linux understand them better, and help those people that devote their mind to program in gcc/g++ environment successfully design C/C++ language and assemble language's combined programs, this paper introduces how to embed assemble language codes in C/C++ language programs in gcc/g++ environment of Linux,and analyzes how the assemble language programs connect with C/C++ language programs that call them in detail.
Keywords:AT&T standard  embedded assemble language  parameters' transfer  name exchange  
本文献已被 CNKI 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号