assume cs:code
code segment
start:
mov ax,cs
mov ds,ax
mov si,offset loopstart
mov ax,0
mov es,ax
mov di,200h
mov cx,offset loopend-offset loopstart
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,80
int 7ch
mov ah,4ch
int 21h
loopstart:
jmp begin
db '!'
begin:
push ax
mov ax,0
mov ds,ax
mov si,202h
mov ax,0b800h
mov es,ax
mov di,0
pop ax
mov cx,ax
s:
mov al,[si]
mov es:[di],al
add di,2
dec cx
cmp cx,0
jne s
iret
loopend:
nop
code ends
end start