data segment
org 1000h
buffer db 'hello ASM!zjh20170623'
strlen equ $-buffer
org 2000h
outstr db strlen dup(?)
db '$'
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
;---------------
mov cx,strlen
mov si,0
LP1:
mov al,[si+buffer]
cmp al,61h
jb next
cmp al,7ah
ja next
sub al,20h
next:
mov [si+outstr],al
inc si
loop LP1
output:
mov dx,offset outstr
mov ah,09h
int 21h
mov ah,4ch
int 21h
code ends
end start