开发者

Call Another Source File

开发者 https://www.devze.com 2023-01-03 20:37 出处:网络
I\'m building a program(in 16-Bits) using Assembly(nasm as the assembler), but as I love to开发者_开发知识库 have things organized in different source files. Let\'s think I have 2 sources, one called

I'm building a program(in 16-Bits) using Assembly(nasm as the assembler), but as I love to开发者_开发知识库 have things organized in different source files. Let's think I have 2 sources, one called main.asm and another one called source2.asm, but I want to call the source1.asm content in the middle of main.asm. How could I do this?


Use the %include directive. See nasm manual section 4.5


Use GLOBAL and EXTERN.

0

精彩评论

暂无评论...
验证码 换一张
取 消