.echo expression [, expression [, expression [, ... ]]]
This outputs text or the result of an expression to the output console. For example:
_routine:
ld (hl), a
inc hl
ret
_end_of_routine:
.echo "The routine _routine is "
.echo _end_of_routine - _routine
.echo " bytes in size.\n"
Unlike TASM, you can specify multiple arguments by splitting up expressions with commas - for example:
.echo "The routine _routine is ", _end_of_routine - _routine, " bytes in size.\n"
The .echoln directive echoes a newline character at the end of the list of items. For example, both of these do the same thing:
.echoln "x=", x .echo "x=", x, "\n"
The first expression can be a .NET-style format string, after which the subsequent expressions will be substituted into it.
echoln "PC is ${0:X4} on page {1}", $, #