In reply to desperadorocks:
Sorry, I misread your original question. You are compiling this C code to run on your simulated DUT. You would need to create a virtual I/O device and have your C code write data to its address. Then you could display the data as a message.
Also suggest reading: