分类: WINDOWS
2008-04-02 21:58:14
dseg segment para public'dseg'
m db 1,2h,3,4h,5,6h,7,8h,9,10h,11,12h,13,14h,15,16h,17,18h,19,20h
p db 20 dup(?)
n db 20 dup(?)
dseg ends
assume cs:cseg,ds:dseg
cseg segment
mov ax,dseg
mov ds,ax
lea si,p
lea di,n
lea bx,m
xor ax,ax
xor dx,dx
mov cx,20
l1: mov al,[bx]
test al,80h
jz l2
mov [di],al
inc bx
inc di
jmp l3
l2:mov [si],al
inc bx
inc si
inc dl
l3:loop l1
mov cx,1
l5:cmp dl,10
jb l4
add dl,7
l4:add dl,30h
mov ah,2
int 21h
mov dl,dh
loop l5
cseg ends
end