Yordan Borisov
Yordan Borisov

Reputation: 1652

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.

Upvotes: 0

Views: 374

Answers (2)

Luchian Grigore
Luchian Grigore

Reputation: 258548

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.

Upvotes: 1

Foo Bah
Foo Bah

Reputation: 26251

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.

Upvotes: 1

Related Questions