;看看吧,这个程序非常有意思啊(我写的)!注意:这个程序是错的!
;目的是考考大家!
assume cs:code
data segment
db 'i love you',0
data ends
code segment
start: mov ax,cs ;installation program
mov ds,ax
mov si,offset int_start
mov ax,0
mov es,ax
mov di,200h
mov cx,offset int_end-offset int_start
cld
rep movsb
mov ax,0
mov es,ax
mov word ptr es:[7ch*4],200h
mov word ptr es:[7ch*4+2],0
mov ax,0b800h
mov es,ax
mov dh,5
mov dl,12
mov cl,11001010b
mov ax,data
mov ds,ax
mov si,0
int 7ch
int_start: mov al,160
mov ah,0
mul dh
mov dh,0
add ax,dx
mov bx,ax
;mov bx,5*160+40
mov di,0
cyc: mov al,ds:[si]
cmp al,0
je ok
mov es:[bx+di],al
mov es:[bx+di+1],cl
inc si
add di,2
jmp short cyc
ok: mov ax,4c00h
int 21h
int_end: nop
code ends
end start |