assume cs:code,ds:data
code segment
data segment
db 'word123',0
db 'unix',0
db 'wind',0
db 'good',0
data ends
start:
mov ax, data
mov ds, ax
mov bx, 0
mov cx, 4
mov ax,0b800h
mov es,ax
mov di,12*160+32*2
s:
mov si, bx
call capital
;add bx, 5
loop s
mov ax,4c00h
int 21h
capital:
push di
push cx
push si
change:
mov cl, [si]
mov ch, 0
jcxz ok
mov al, [si]
mov byte ptr es:[di], al
inc di
mov byte ptr es:[di], 25h
inc di
inc si
inc bx
jmp short change
ok:
pop si
pop cx
pop di
inc bx ;skip "0" flag
add di, 160
ret
code ends
end start
阅读(1636) | 评论(0) | 转发(0) |