assume cs:codesg stacksg segment db 128 dup (0) stacksg ends codesg segment start: mov ax,stacksg mov ss,ax mov sp,128 ;;;;;;;;;;;;;;;;;;;;;;copy the int9 interupt program;;;;;;;;;;;;;;; mov ax,0 mov es,ax mov di,204h mov ax,cs mov ds,ax mov si,offset int9 mov cx,offset int9end-offset int9 cld rep movsb push es:[9*4] pop es:[200h] push es:[9*4+2] pop es:[202h] cli mov word ptr es:[9*4],204h mov word ptr es:[9*4+2],0 sti mov ax,4c00h int 21h ;;;;;;;;;;;;;;;;;;int9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; int9: push ax push bx push cx push es mov ax,0 mov es,ax in al,60h pushf call dword ptr es:[200h] cmp al,1h jne int9iret mov ax,0b800h mov es,ax mov bx,1 mov cx,2000 s2: inc byte ptr es:[bx] add bx,2 loop s2 int9iret: pop es pop cx pop bx pop ax iret int9end:nop codesg ends end start