汇编语言第3版 实验11 编写子程序

assume cs:codesg

datasg segment
	db "Beginner's All-purpose Symbolic Instruction Code.",0
datasg ends

codesg segment
start:
	mov ax,datasg
	mov ds,ax
	mov si,0
	call letterc
	mov ax,4c00h
	int 21h
	
letterc:
	push ax
	push cx
s:	mov al,ds:[si]
	mov ah,0
	mov cx,ax
	jcxz exit
	cmp al,61h
	jb continue
	cmp al,7Ah
	ja continue
	and al,11011111B
	mov ds:[si],al
continue:
	inc si
	loop s
exit:
	pop cx
	pop ax
	retn	
codesg ends
end start

猜你喜欢

转载自blog.csdn.net/duling2/article/details/84308502