KONST_S equ 254 KONST_P equ 360 KONST_G equ 24 org 256 mov ah,4ah mov bx,2*4096 int 21h jc exit cld mov si,80h lodsb cbw add si,ax xor ax,ax int 33h inc ax jnz exit mov [si],ax mov ah,3dh mov dx,82h int 21h jc exit xchg ax,bx mov cx,321*201 mov dx,area mov ah,3fh int 21h sub cx,ax jnz exit mov ah,0fh int 10h cbw push ax mov al,13h int 10h mov al,7 mov dx,319 int 33h inc ax mov dx,199 int 33h mov ax,1200h xor bx,bx cwd mov di,1010h mov si,180 mov bp,-82 next push cx mov cl,ah xchg ax,di int 10h pop cx xchg ax,di add ax,bp add dx,si dec si inc bp add cx,byte 40h inc bl jnz next fill mov ax,3 int 33h shr bx,1 jnc draw pop ax int 10h exit ret draw push cs pop ds mov ax,cs add ax,4096 mov es,ax xor di,di mov si,area+321 line mov bx,320 push cx plot mov bp,KONST_P push bx push dx xchg ax,dx imul ax idiv bp xchg ax,bx mov ax,cx imul ax idiv bp add bx,ax pop dx mov bp,KONST_G mov al,[si-321] sub al,[si] sbb ah,ah push dx imul dx idiv bp sub bx,ax lodsb sub al,[si] sbb ah,ah imul cx idiv bp pop dx sub ax,bx pop bx add ax,KONST_S add ah,ah jz done sbb al,al not al done stosb dec cx dec bx jnz plot pop cx inc si dec dx cmp di,320*200 jc line push es pop ds mov ax,0a000h mov es,ax xor si,si xor di,di mov cx,320*200/2 mov dx,03dah lead in al,dx test al,8 jnz lead fall in al,dx test al,8 jz fall rep movsw jmp fill area