PutCharExD function
The PutCharExD function outputs to the screen a character with the specified background and text color attributes. The function automatically aligns the stack to 6 bytes.
Parameters (stack): 1. Character. 2. Background color. 3. Character color.
Return value: The function does not return a value.
Flag state: The function does not modify the flags.
Program source code
Intel 8086 assembly program example demonstrating the use of the PutCharExD function to output a color character with attributes through the stack.
title .286C .model small .stack 100h code segment public assume cs:code include Handyfar.inc ; Include the file with functions include Handymac.inc ; Include the file with macros main proc ; Call the SetDataSegment procedure call SetDataSegment push BLACK ; Push the text color value onto the stack push CYAN ; Push the background color value onto the stack push 'A' ; Push character 'A' onto the stack call PutCharExD ; Call procedure PutCharExD('A', CYAN, BLACK) push 0 ; Push the byte return code onto the top of the stack call ExitProcessEx ; Call the ExitProcessEx(0) procedure main endp code ends end main
A
Example taken from the textbook "HANDYFAR - MASM (Evgeny Sergeevich Dovgopolov)".