<<< The output Macro (print ASCII characters) | Index | The szlen Macro (string length) >>> |
Inputs a string of characters from the keyboard.
It has two parameters, destination and length:
input destination, length
where
destination operand references a string of bytes in the data segment
length operand references the number of bytes reserved in the destination string.
For example,
.DATA ; Begin initialized data segment buffer BYTE 12 DUP (?) .. .CODE ; Code segment .. input buffer, 12 ; Read zero to 10 ASCII characters ..
Important: The destination string should be at least two bytes longer than the actual number of characters to be entered.
This allows for the operating system to add carriage return and line feed characters when user presses the Enter key.
The input macro automatically replaces the carriage return character by a null byte.
The result is a null-terminated string stored at the destination.
The input macro updates memory at the specified destination.
Flags or registers affected: none.
<<< The output Macro (print ASCII characters) | Index | The szlen Macro (string length) >>> |