Changes the Text Writer output device.
The output of text written using Write and
WriteLn can be set using the
WriteAssign
macro. At program startup, this is automatically set to the wdCRT
as long the CRT functions have not been excluded. If NO_CRT
has been defined,
it will be set to wdCONSOLE
instead.
When changing the output device, use the constants and not the values. They are easier to read and the actual values may change in future versions.
WARNING: You should not write to the screen using any of basic the DOS or BIOS functions when the CRT functions are included. Doing so can have unpredictible visual results. Such as text being display in incorrect location or numerious other visual artifacts. The DOS and BIOS output is still available for the support of things like I/O redirection. Write and WriteLn have no such restrictions.
Predefined device constants:
wdNULL | internal no output device |
wdTELETYPE | BIOS Teletype device |
wdCONSOLE | DOS Standard output device using a file handle. |
wdSTDOUT | alias of wdCONSOLE . |
wdERROR | DOS Error device using file a handle. |
wdAUX | DOS Auxiliary device using a file handle. |
wdPRINTER | DOS Printer device using a file handle. |
wdCRT | CRT display device. CRT fuctions must not be excluded with the
NO_CRT define. |
wdMEMORY | Mostly internal usage in writing to buffers. However, it can be used with library File operations. |
(other value) | output to file handle. |
Examples:
WriteAssign wdCONSOLE ; send text to DOS Standard Output WriteAssign wdCRT ; send text through CRT functions WriteAssign bx ; send text to file handle BX WriteAssign ds:si, 64 ; send text to a memory buffer at ds:si. The ; buffer is 64 bytes. Which supports a total ; of 63 characters + an ASCIIZ terminator. ; Also, set write position in buffer to 0.
See also Write, WriteLn and the File macro group.