Uppercase and lowercase conversions

Source: Internet
Author: User

1 ;the ASCII code of the lowercase letter is 20H larger than the uppercase ASCII value. 2 ;For example, the ASCII value of capital A of 01000001 lowercase a is: 011000013 ;Formula A (01100001)-20H (100000) = A (01000001)4 ;A (01000001) + 20H (100000) = A (01100001)5AssumeCS:CODESG,ds:DATASG6 7 DATASG Segment8 9Db'Basic' ;Defining charactersTenDb'Information' One      A DATASG ends -  - CODESG Segment the  - Start: movAx,datasg;passing defined characters into the AX General register in 16-way -        movDs,ax;then point to the data segment address -         +        movBx0 ;set the offset address to 0 so that you get to ds:[0] = ' B ' -         +        movCx5 ;CX is set to 5 times, loop to get basic characters A     S: movAL,[BX];send DS:[BX] memory data to Al low eight-bit registers at         andal,11011111B ;Bitwise and operation of data in AL to uppercase letters -        mov[Bx],al;returns the converted ASCII to the original unit -        IncBx;BX plus 1, add 5 times, point to basic memory address -Loop s;Continue looping -         -        movBx5 ;set BX offset address to 5, point to basic in        movCx One ;Cycle 11 times -         to     s0: movAL,[BX];, get information +         orAl00100000B ;set the ASCII code's fifth bit to 1 and lowercase -         mov[Bx],al;write the converted ASCII code back to the original unit the         IncBx;add 1 in turn *Loop S0;Continue looping $     movax,4c00hPanax Notoginseng     int21H - CODESG ends theEnd Start

Uppercase and lowercase conversions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.