org 256 mov ah,0fh int 10h cbw push ax mov al,13h int 10h std cwd xor bx,bx mov cx,0ffffh mov si,diff+11 mov es,[si] step add dh,[si] add cx,[si-2] part mov ax,1010h int 10h inc bx test bl,03fh jnz step lodsb lodsw and bh,bh jz part xor cx,cx kresli: mov dx,320 ; hlavni posun mov di,1 ; vedlejsi posun mov ax,cx ; ax=abs(x0-x1).. mov bl,199 ; bx=D push cx ; test sudost shr cl,1 pop cx jnc sude mov si,256 ; liche: dolu, hp=320, vp=1,-1, K=abs(x0-x1), D=199 sub ax,192 ; abs(x0-x1)=abs(256-(64+barva))=abs(192-barva) jnc cara ; skok pro x0>x1 - nastaveno neg di ; jinak je x0D/2 pop bx jl pokrac add si,di ; bod=bod+vp sub ax,bx ; prub=prub-D pokrac: add ax,bp dec ch jnz cyklus inc cl jnz kresli ; barva od 0 do 255, konec pri 256(=0) mov ah,8 int 21h pop ax int 10h ret diff db 0,0,1,1,1,-1,-1,-1,1,1,0,0,0a0h