首页 > 代码库 > 王爽汇编实验十一

王爽汇编实验十一

;实验11;把小写字母换成大写字母assume cs:code , ds:datadata segment        db "Beginner‘s All-purpose Symbolic Instruction Code.",0 data endscode segmentstart:        mov ax,data        mov ds,ax        mov si,0        call letterc        mov ax,4c00h        int 21hletterc:        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        RETCODE ENDSEND start