Assembler and c++ output text
How can I display text with assembler in c++ code? I want to make a function with a parameter the string开发者_开发知识库 which will be displayed.
In the assembler you can make the appropriate system calls to read or write. Your OS will have a description of the supported system calls, and generally there is some sort of operation (eg interrupt 80h or sys call instruction) to make a system call.
Without more details (eg operating system or hardware) that's as specific as I can get.
I suggest you write a sample application with a prinf
in it and look at the compiled code. In VS you can easily do this while debugging, just go to "Show dissasembly". Not sure how you would do it under *nix, but I'm pretty sure it's doable.
精彩评论