Out_Debug_String

include vmm.inc

pushfd                              ; save flags on stack
pushad                              ; save registers on stack
mov     esi, OFFSET32 String        ; points to string to write
VMMCall Out_Debug_String
popad
popfd
 

(Windows 3.1x) Writes a null-terminated string to the debugging device (typically the COM1 serial port). If the string contains register placeholders, Out_Debug_String replaces these with the actual register values in hexadecimal, or the symbolic label nearest to the specified addresses. Uses all registers and flags.

String
Points to a null-terminated string specifying the message to write to the debugging device. Out_Debug_String uses the lods instruction to process characters in the string, so the DS register must specify the correct segment selector for the string.

The string can contain one or more placeholders having the following forms:
Placeholder Description
#register Displays the current value of the specified register. For example, the service replaces #AX with the value of the AX register. The register must not be the name of a segment register.
?register Displays the label nearest the address specified by the registers. For example, the service replaces ?EAX with the VMM code segment label nearest the address in the EAX register. The register must not be the name of a segment register.
?register:register Displays the label nearest the address specified by the registers. For example, the service replaces ?AX:EBX with the label in the segment specified by the AX register that is nearest to the address in the EBX register. The register must not be the name of a segment register.

This service has no effect in the retail version of Windows. It is intended to be used with the debugging version.

If the string contains placeholders, Out_Debug_String requires the caller to use the pushfd and pushad instructions before carrying out a near call to this service.

See Also

Trace_Out