首页 > 代码库 > 汇编实验11

汇编实验11

assume cs:code,ds:data

data segment
    db "Beginner‘s All-purpose Symbolic Instruction Code.",0
data ends

code segment
start:
    mov ax,data
    mov ds,ax
    mov si,0
    call letterc

    mov ax,4c00h
    int 21h

letterc:
    push cx
    push si
    s1:
    mov cl,[si]
    mov ch,0
    jcxz ok
    cmp cl,97
    jnb s2
    jmp short s3

    s2:
    cmp cl,122
    ja s3
    and cl,11011111b
    mov [si],cl


    s3:
    inc si
    jmp short s1

    ok:
    pop si
    pop cx
    ret
code ends
end start

技术分享

技术分享

技术分享

 

汇编实验11