网络技术 实验报告 jcxz ok mov es:[bx+di],cl mov es:[bx+di+1],al inc si add di,2 jmp short s ok: pop si pop cx pop bx ret code ends end start 运行结果如下: 东北大学秦皇岛分校电子信息系 第32页 网络技术 实验报告 实验11 编写子程序 编写一个子程序,将包含任意字符,以0结尾的字符串中的小写字母转换成大写字母。 子程序描述如下: 名称:letterc 功能:将以以0结尾的字符串中的小写字母转换成大写字母 参数:ds:si指向字符串首地址 应用举例: assume cs:codesg datasg segment db \datasg ends codesg segment begin:mov ax,datasg mov ds,ax mov si,0 call letterc mov ax,4c00h int 21h letterc: : : codesg ends end begin 完整程序如下: assume cs:codesg datasg segment db \ datasg ends codesg segment begin: mov ax,datasg mov ds,ax mov si,0 call letterc 东北大学秦皇岛分校电子信息系 第33页 网络技术 实验报告 mov ax,4c00h int 21h letterc: ;子程序部分[开始] push si s0: mov al,[si] cmp al,0 je exitsub cmp al,61h ;61h为'a'的ASCII码 jb next cmp al,7ah ;7ah为'z'的ASCII码 ja next and al,11011111B ;或使用sub al,20h mov [si],al next: inc si jmp short s0 exitsub: pop si ret ;子程序部分[结束] codesg ends end begin 运行结果如下: 东北大学秦皇岛分校电子信息系 第34页 网络技术 实验报告 东北大学秦皇岛分校电子信息系 第35页
4100608吴旭东 汇编实验 - 图文
2026/1/20 5:24:11
4100608吴旭东 汇编实验 - 图文.doc
将本文的Word文档下载到电脑

