首页 > 其他 > 详细

汇编-小写字母转换为大写字母

时间:2014-11-06 13:01:15      阅读:176      评论:0      收藏:0      [点我收藏+]
一、实习题目:小写字母转换为大写字母

二、实习目的:

 1、掌握分支程序设计方法

 2、了解小写字母和大写字母在计算机中的表示方法并显示。

三、代码:

 

data segment
  A db 'a';
  B db 'z';
  C db 00h;
  bb db 0ah,0dh,'$'
  string db 0ah,0dh,'The input num is not a case letter','$';
data ends


code segment
  assume DS:data,CS:code
  
start:
  mov ax,data;
  mov ds,ax;

  mov ah,01h;
  int 21h;
  
  cmp al,A;
  jl next1;
  cmp al,B;
  jg next1;
  
  mov C,al;
  
  mov dl,bb;
  mov ah,02h;
  int 21h;
  
  mov al,C;
  sub al,20h;
  mov dl,al;
  mov ah,02h;
  int 21h;
  
  jmp next2;
  
next1:

  lea dx,string;
  mov ah,09h;
  int 21h;
  
next2: 

  mov ah,4ch;
  int 21h;
  
code ends
end start

四、运行结果:

bubuko.com,布布扣



汇编-小写字母转换为大写字母

原文:http://blog.csdn.net/u013507368/article/details/40858911

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!