The ToUpperChar function
The ToUpperChar function converts a character of the English and Russian alphabet from lowercase to uppercase. If the character is already uppercase or is not a letter, it is returned unchanged.
Parameters: AL: The character to convert.
Return value: AL: The character in uppercase.
Flag state: The function does not modify the flags.
Program source code
An example program for the Intel 8086 assembler demonstrating the use of the ToUpperChar function to convert a character to uppercase.
title .model small .stack 100h code segment public ; Start of the code segment assume cs:code include Handyfar.inc ; Include the file with functions main proc ; Start of the main procedure call SetDataSegment ; Call the SetDataSegment procedure mov al, 'd' ; Copy the 'd' character value into the al register call ToUpperChar ; Call the ToUpperChar procedure (al:'d') call PutChar ; Call the PutChar procedure (al:'D'); xor al, al ; Clear the al register call ExitProcess ; Call the ExitProcess procedure main endp ; End of the main procedure code ends ; End of the code segment end main ; End of file. The main procedure is the entry point
D
Example taken from the textbook "HANDYFAR - MASM (Evgeny Sergeevich Dovgopolov)".