将一段数据中的字母的前四项小写改大写(汇编)

 1 assume cs:codesg,ss:stacksg,ds:datasg
 2 
 3 datasg segment
 4   db '1. display      '
 5   db '2. brows        '
 6   db '3. replace      '
 7   db '4.modify        '
 8 stacksg segment
 9   dw 0,0,0,0,0,0,0,0
10   stacksg ends
11  codesg segment
12  start:mov ax,stacksg
13        mov ss,ax
14        mov sp,0
15        mov ax,datasg
16        mov ds,ax
17        mov cx,4
18        
19        mov bx,3
20        s:push cx
21          mov cx,4
22          mov si,0
23          s0:mov al,[bx+si]
24             and al,11011111b
25             mov [bx+si],al
26             inc si
27             loop s0
28           add bx,16
29           pop cx
30           loop s
31           mov ax,4c00h
32           int 21h
33           codesg ends
34           end start
35             inc si

 

posted @ 2016-04-06 16:09  xhyxhy  阅读(191)  评论(0编辑  收藏  举报