code1	segment 'code'
assume CS:code1,DS:code1;
org	100h
main	proc
	jmp	init
color8:	mov	color,8
	jmp	fin
count	db	3
color	db	8
disk	db	0
int1c:	push	ax
	push	bx
	push	dx
	mov	dx,3f2h
        mov	al,00000000b;--------
	out	dx,al;---------------
	cmp	disk,2;-1-
	je	diskB
	mov	color,8
diskA:	cmp	count,0
	je	run2A;-runB-
	dec	count
	mov	al,00010000b
	out	dx,al
	mov	ax,1001h
	dec	color
	mov	bh,color
	int	10h
	cmp	color,0
	je	color8
	jmp	fin
runB:	mov	count,3
	mov	disk,2;-3-
diskB:	cmp	count,0
	je	runA
	dec	count
	mov	al,11110001b
	out	dx,al
        dec	color
	mov	bh,color
	int	10h
	cmp	color,0
	je	color8
	jmp	fin
runA:	mov	count,3
	mov	disk,0
	jmp	diskA
run2A:	inc	disk;------------
	mov	count,3;---------
fin:	pop	dx
	pop	bx
	pop	ax	
	iret
main	endp
init	proc
	mov	ax,251ch
	mov	dx,offset int1c
	int	21h
	mov	dx,(init-main+10fh)/16
	mov	ax,3100h
	int	21h
init	endp
ends	code1
end	main