王爽《汇编语言》实验11

assume cs:codesg
datasg segment
  db "Beginner's All-purpose Symbolic Instruction Code.",0
datasg ends
codesg segment
  begin:    mov ax,datasg
            mov ds,ax
            mov si,0
            call letterc
            mov ax,4c00h
            int 21h
  letterc:   pushf
             push si
             push cx
	     mov ch,0
	   s:mov cl,ds:[si]
	     jcxz ok
	     cmp byte ptr ds:[si],61h
	     jb next
	     cmp byte ptr ds:[si],90h
	     ja next
	     and byte ptr ds:[si],11011111b
     next:inc si
            jmp short s
       ok:pop cx
            pop si
	    popf
            ret
 codesg ends
 end begin

猜你喜欢

转载自blog.csdn.net/weixin_41944412/article/details/80385100
今日推荐