Assembly-convert lowercase letters to uppercase letters

Source: Internet
Author: User
Zookeeper I. Internship questions:Convert lowercase letters to uppercase letters

II. Purpose:

 1. Master branch program design methods

2. Understand the representation of lower-case letters and upper-case letters on the computer and display them.

III. Code:

 

Data segment A db 'A'; B db 'Z'; C db 00 h; bb db 0ah, 0dh, '$' string db 0ah, 0dh, 'The input num is not a case letter ',' $ '; data endscode segment assume DS: data, CS: code start: mov ax, data; mov ds, ax; mov ah, 01 h; int 21 h; cmp al, A; jl next1; cmp al, B; jg next1; mov C, al; mov dl, bb; mov ah, 02 h; int 21 h; mov al, C; sub al, 20 h; mov dl, al; mov ah, 02 h; int 21 h; jmp next2; next1: lea dx, string; mov ah, 09 h; int 21 h; next2: mov ah, 4ch; int 21 h; code endsend start

IV. Running result:


Zookeeper

Assembly-convert lowercase letters to uppercase letters

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.