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

一、实习题目:小写字母转换为大写字母

二、实习目的:

 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

四、运行结果:



时间: 2024-08-02 19:24:07

汇编-小写字母转换为大写字母的相关文章

将小写字母转换为大写字母

var pinyin = (function () { var Pinyin = function (ops) { this.initialize(ops); }, options = { checkPolyphone: false, charcase: 'default' }; Pinyin.fn = Pinyin.prototype = { init: function (ops) { this.options = extend(options, ops); }, initialize: f

小写字母转换为大写字母

#include<stdio.h> int main() { char ch; printf("please input:\n"); scanf("%c",&ch); if(ch>='a'&&ch<='z') ch-=32; printf("%c",ch); getchar(); return 0; } 运行结果如下: 原文地址:https://www.cnblogs.com/pyp2001/p/1

字母转为大写字母

自定义Scalar-valued Function函数,把字母转换为大写字母. 字母转为大写字母a-->A;b-->B;c-->C;...z-->Z如果非字母转换为'' SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: Insus.NET -- Blog: https://insus.cnblogs.com -- C

python中将指定的字符串转换为大写字母并每隔2个字符用空格分割后得到一个新字符串的方法

在例子中对指定的字符串: faa5fbb5fcc5fdd5010200000028000001900000000a002d00000000017d7840000003e800005fa55fb55fc55fd5 使用了三种方法将其转换为大写字母并每隔2个字符用空格分割处理后得到一个新字符串,为: FA A5 FB B5 FC C5 FD D5 01 02 00 00 00 28 00 00 01 90 00 00 00 0A 00 2D 00 00 00 00 01 7D 78 40 00 00

C#:小写金额转换为大写

#region 小写金额转换为大写 public static string CurrToChnNum(double Currnum) { string sResult = ""; if (Math.Abs(Currnum) < 1e-20) return "零圆整"; if (Currnum < 1e-20) sResult = "负"; sResult = sResult + StringToChnNum(Math.Abs(Mat

小写金转换为大写

<body><input type="text" id="txt"/><br/><input type="button" id="ss" value="submit"/><br/><input type="text" id="result"/></body><script typ

Oracle 小写金额转换为大写

在开发EBS的合同报表打印的时候需要将小写金额转换为大写. 如下是本人自己写的转换函数. 主要思路:先获取小数点位置,在区分整数与小数点处理,根据位数和数字组合读取金额. 最后再处理特殊显示部分. /******************************************************************* *  FUNCTION get_big_amount 数字金额转换为大写 *  p_amount 输入数据金额 *  返回大写金额,位数 :千亿----厘 ****

校验金额、大小写字母、大写字母、合法uri、email

/* 合法uri*/ export function validURL(url) { const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|

汇编实战一:大写字母转换成小写形式

DATAS SEGMENT ;此处输入数据段代码 str1 db "Please enter a captial letter:" db 0dh,0ah,'$' str2 db "Error Input" db 0dh,0ah,'$' DATAS ENDS STACKS SEGMENT ;此处输入堆栈段代码 STACKS ENDS CODES SEGMENT ASSUME CS:CODES,DS:DATAS,SS:STACKS START: MOV AX,DATAS