Crossware

Table of Contents        Previous topic       Next topic       

I/O via Host PC->Character I/O

putch() and getch() can be called directly.  putch() will write data to the Debug Window in the Embedded Development Studio and getch() will read data that is typed into this Debug Window.

putch() and getch() can be used indirectly by calling one of the functions that use them, such as printf() and scanf().

Here is a loop which uses printf() to display the value of variable k in the Debug Window and uses scanf() to obtain a new value for it:

    while (1)
    

Note that the Debug Window will not be created until a character is written to it with putch().

If your program includes your own versions of putch() and getch(), then these special versions will not be used.