汇编语言实验6将datasg段中每个单词的前5个字母改成大写字母

编程,将datasg段中每个单词的前5个字母改成大写字母

assume cs:codesg,ds:datasg,ss:stacksg
stacksg segment
    dw 0,0,0,0,0,0,0,0
stacksg ends

datasg segment
    db '1. display      '
    db '2. brows        '
    db '3. replace      '
    db '4. modify       '
datasg ends

codesg segment
start:
    mov ax,datasg
    mov ds,ax
    mov si,0
    mov cx,5
s0:
    push cx
    mov bx,0
    mov cx,4
s1:
    mov al,[bx][si].3
    and al,11011111B
    mov [bx][si].3,al
    add bx,10h
    loop s1

    inc si
    pop cx
    loop s0

    mov ax,4c00h
    int 21h

codesg ends
end start

发布日期:

所属分类: 易语言 标签: