Console I/O Functions
The IN and OUT MPL functions may be used to perform console I/O.
The IN function prompts for input from the console. When called, the IN function displays two greater-than characters ('>>') and waits for input. The IN function is expanded as the text entered on the console. The syntax for the IN function is:
%IN
The OUT function writes a specified text string to the console. The OUT function is expanded as a null string. The syntax for the OUT function is:
%OUT (balanced-text)
Source Text
%OUT (Enter Baud Rate)
%SET (BAUD_RATE,%IN)
BAUD_RATE = %BAUD_RATE
Display Text
Enter Baud Rate>>
Output Text
BAUD_RATE = 19200
Note
- The IN and OUT MPL functions may only be used if the assembler is invoked from the command line. If the µVision IDE is used to run the tools, console input and output are not possible.