왕량 어셈블리 실험11

3324 단어
;  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 ax
        push si

   fun: mov al,[si]
        cmp al,0
        je f
        inc si
        cmp al,'a'
        jb fun
        cmp al,'z'
        ja fun
        add al,'A'-'a';      and al,11011111b
        mov [si-1],al
        jmp fun

    f:  POP si
        POP ax
        RET


CODE ENDS
END start 

 
전재 대상:https://www.cnblogs.com/sylvialucy/p/3927723.html

좋은 웹페이지 즐겨찾기