ToLowerCharEx function
The ToLowerCharEx function converts a character from the stack to lowercase and stores the result on the top of the stack and in AL. It does not align the stack, which allows nested calls (for example, PutCharEx(ToLowerCharEx('D'))).
Parameters (stack): 1. Character to convert.
Return value: AL: the character in lowercase (it also remains on the stack).
Flag state: The function does not modify the flags.
Program source code
Intel 8086 assembly program example demonstrating the use of the ToLowerCharEx function to convert and print a character.
title .286C .model small .stack 100h code segment public assume cs:code include Handyfar.inc ; Include the file with functions main proc call SetDataSegment ; Call the SetDataSegment procedure push 'D' ; Push the 'D' character value onto the stack call ToLowerCharEx ; Call procedure ToLowerCharEx('D') call PutCharEx ; Call procedure PutCharEx(value from the stack) 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
d
Example taken from the textbook "HANDYFAR - MASM (Evgeny Sergeevich Dovgopolov)".