So far, we’ve looked at assembly language programs that call the Linux kernel directly, and assembly language programs that call glibc. We’re now going to look at assembly language methods that are callable from C or C++ programs. In Chapter 3 , you wrote an assembly language program that has a main. In this chapter, we don’t have the same program written in C and in assembly language. Instead, we have a C program that invokes the printEnv function. The printEnv method is in its own module environment.asm. It does not have a main. It also illustrates the nasm/yasm macro capability. Using the macro capability makes your assembly language programs start to look like a high-level language.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Using Macros and Passing Arguments on the Stack

  • John Schwartzman

摘要

So far, we’ve looked at assembly language programs that call the Linux kernel directly, and assembly language programs that call glibc. We’re now going to look at assembly language methods that are callable from C or C++ programs. In Chapter 3 , you wrote an assembly language program that has a main. In this chapter, we don’t have the same program written in C and in assembly language. Instead, we have a C program that invokes the printEnv function. The printEnv method is in its own module environment.asm. It does not have a main. It also illustrates the nasm/yasm macro capability. Using the macro capability makes your assembly language programs start to look like a high-level language.