OutputDebugStr

Syntax

void OutputDebugStr(lpOutputString)

This function sends a debugging message directly to the COM1 port or to a secondary monochrome display adapter. Because it bypasses DOS, it can be called by low-level callback functions and other code at interrupt time.

Parameters

LPSTR lpOutputString

Specifies a far pointer to a null-terminated string.

Comments

This function is available only in the debugging version of the Multimedia extensions. The DebugOutput keyname in the [mmsystem] section of SYSTEM.INI controls where the debugging information is sent. If DebugOutput is 0, all debug output is disabled. If DebugOutput is 1, debug output is sent to the COM1 port. If DebugOutput is 2, debug output is sent to a secondary monochrome display adapter.

To print the contents of a register, use the pound sign (#) followed by one of the following register designations: “ax”, “bx”, “cx”, “dx”, “si”, “di”, “bp”, “sp”, “al”, “bl”, “cl”, “dl”. For example, to print the stack pointer and accumulator registers, pass the following string to OutputDebugStr:

        "SP=#sp\r\nAX=#ax\r\n"