Спасибо SERGE_BLIZNUK!
Посидев в нете и подумав головой, наконец все вышло.
Кому интересно, вот что получилось:
[more=Пример кода можно посмотреть тоже] ;B--X(0) C--Y(i) D--F(i) E--X(k) H--Y(k)
LIN1-2: MVI B,00H ;X0=00D
MOV C,B ;Y0=00D
MOV D,B ;F0=00D
MVI E,10D
MVI H,60D
L10: MVI A,50D
SUB B
OUT 01H ;VIVOD
MOV A,C
ADI 50D
OUT 02H ;VIVOD
MOV A,D ;A<--F(i)
ANA A ;ZNAK F(i)
JP L11
INR C ;Y(i+1)=Y(i+1)+1
ADD E ;F(i+1)=F(i)+Xk
JMP L12
L11: INR B ;X(i+1)=X(i)+1
SUB H ;F(i+1)=F(i)-Y(k)
L12: MOV D,A ;D<--F(i+1)
MOV A,B
CMP E
JM L10
MOV A,C
CMP H
JM L10
;B--X(0) C--Y(i) D--F(i) E--X(k) H--Y(k)
LIN2-3: MVI B,00H ;X0=00D
MOV C,B ;Y0=00D
MOV D,B ;F0=00D
MVI E,20D
MVI H,10D
L20: MOV A,B
ADI 40D
OUT 01H ;VIVOD
MVI A,110D
SUB C
OUT 02H ;VIVOD
MOV A,D ;A<--F(i)
ANA A ;ZNAK F(i)
JP L21
INR C ;Y(i+1)=Y(i+1)
ADD E ;F(i+1)=F(i)+Xk
JMP L22
L21: INR B ;X(i+1)=X(i)+1
SUB H ;F(i+1)=F(i)-Y(k)
L22: MOV D,A ;D<--F(i+1)
MOV A,B
CMP E
JM L20
MOV A,C
CMP H
JM L20
;B--X(0) C--Y(i) D--F(i) E--X(k) H--Y(k)
LIN3-4: MVI B,00D ;X0=00D
MOV C,B ;Y0=00D
MOV D,B ;F0=00D
MVI E,10D
MVI H,50D
L30: MOV A,B
ADI 60D
OUT 01H ;VIVOD
MOV A,C
ADI 100D
OUT 02H ;VIVOD
MOV A,D ;A<--F(i)
ANA A ;ZNAK F(i)
JP L31
INR C ;Y(i+1)=Y(i+1)
ADD E ;F(i+1)=F(i)+Xk
JMP L32
L31: INR B ;X(i+1)=X(i)+1
SUB H ;F(i+1)=F(i)-Y(k)
L32: MOV D,A ;D<--F(i+1)
MOV A,B
CMP E
JM L30
MOV A,C
CMP H
JM L30
;B--X(0) C--Y(i) D--F(i) E--X(k) H--Y(k)
LIN4-5: MVI B,00D ;X0=00D
MOV C,B ;Y0=00D
MOV D,B ;F0=00D
MVI E,50D
MVI H,50D
L40: MOV A,B ;
ADI 70D
OUT 01H ;VIVOD
MOV A,C ;
ADI 150D
OUT 02H ;VIVOD
MOV A,D ;A<--F(i)
ANA A ;ZNAK F(i)
JP L41
INR C ;Y(i+1)=Y(i+1)
ADD E ;F(i+1)=F(i)+Xk
JMP L42
L41: INR B ;X(i+1)=X(i)+1
SUB H ;F(i+1)=F(i)-Y(k)
L42: MOV D,A ;D<--F(i+1)
MOV A,B
CMP E
JM L40
MOV A,C
CMP H
JM L40
;B--X(0) C--Y(i) D--F(i) E--X(k) H--Y(k)
LIN5-6: MVI B,00D ;X0=00D
MOV C,B ;Y0=00D
MOV D,B ;F0=00D
MVI E,50D
MVI H,50D
L50: MOV A,B
ADI 120D
OUT 01H ;VIVOD
MVI A,200D
SUB C
OUT 02H ;VIVOD
MOV A,D ;A<--F(i)
ANA A ;ZNAK F(i)
JP L51
INR C ;Y(i+1)=Y(i+1)
ADD E ;F(i+1)=F(i)+Xk
JMP L52
L51: INR B ;X(i+1)=X(i)+1
SUB H ;F(i+1)=F(i)-Y(k)
L52: MOV D,A ;D<--F(i+1)
MOV A,B
CMP E
JM L50
MOV A,C
CMP H
JM L50
;B--X(0) C--Y(i) D--F(i) E--X(k) H--Y(k)
LIN6-7: MVI B,00D ;X0=00D
MOV C,B ;Y0=00D
MOV D,B ;F0=00D
MVI E,20D
MVI H,100D
L60: MOV A,B
ADI 170D
OUT 01H ;VIVOD
MVI A,150D
SBB C
OUT 02H ;VIVOD
MOV A,D ;A<--F(i)
ANA A ;ZNAK F(i)
JP L61
INR C ;Y(i+1)=Y(i+1)
ADD E ;F(i+1)=F(i)+Xk
JMP L62
L61: INR B ;X(i+1)=X(i)+1
SUB H ;F(i+1)=F(i)-Y(k)
L62: MOV D,A ;D<--F(i+1)
MOV A,B
CMP E
JM L60
MOV A,C
CMP H
JM L60
;B--X(0) C--Y(i) D--F(i) E--X(k) H--Y(k)
LIN7-8: MVI B,00D ;X0=00D
MOV C,B ;Y0=00D
MOV D,B ;F0=00D
MVI E,40D
MVI H,10D
L70: MVI A,190D
SBB B
OUT 01H ;VIVOD
MVI A,50D
SBB C
OUT 02H ;VIVOD
MOV A,D ;A<--F(i)
ANA A ;ZNAK F(i)
JP L71
INR C ;Y(i+1)=Y(i+1)
ADD E ;F(i+1)=F(i)+Xk
JMP L72
L71: INR B ;X(i+1)=X(i)+1
SUB H ;F(i+1)=F(i)-Y(k)
L72: MOV D,A ;D<--F(i+1)
MOV A,B
CMP E
JM L70
MOV A,C
CMP H
JM L70
;B--X(i) C--Y(i) D--F(i) E--R
CIR1: MVI A,00D
MVI E,30D ;R=30
MOV B,A ;X(i)=0
MOV C,E ;Y(i)=R
MOV D,A ;F(i)=0
C10: MOV A,B
ADI 120D
OUT 01H
MOV A,C
ADI 40D
OUT 02H
MOV A,D
ANA A
JP C11
ADD C ;\
ADD C ;- F(i+1)=F(i)+2X(i)-1
DCR A ;/
DCR C ;X(i+1)=X(i)-1
JMP C12
C11: SUB B ;\
SUB B ;- F(i+1)=F(i)-2Y(i)-1
DCR A ;/
INR B
C12: MOV D,A ;SOHRANENIE F(i)
MOV A,B
CMP E
JM C10
MVI A,00H
CMP C
JM C10
;B--X(i) C--Y(i) D--F(i) E--R
CIR2: MVI A,00D
MVI E,30D ;R=30
MOV B,A ;X(i)=0
MOV C,E ;Y(i)=R
MOV D,A ;F(i)=0
C20: MVI A,120D
SBB B
OUT 01H
MVI A,40D
ADD C
OUT 02H
MOV A,D
ANA A
JP C21
ADD C ;\
ADD C ;- F(i+1)=F(i)+2X(i)-1
DCR A ;/
DCR C ;X(i+1)=X(i)-1
JMP C22
C21: SUB B ;\
SUB B ;- F(i+1)=F(i)-2Y(i)-1
DCR A ;/
INR B
C22: MOV D,A ;SOHRANENIE F(i)
MOV A,B
CMP E
JM C20
MVI A,00H
CMP C
JM C20
;B--X(0) C--Y(i) D--F(i) E--X(k) H--Y(k)
LIN9-1: MVI B,00D ;X0=00D
MOV C,B ;Y0=00D
MOV D,B ;F0=00D
MVI E,40D
MVI H,10D
L80: MVI A,90D
SBB B
OUT 01H ;VIVOD
MVI A,40D
ADD C
OUT 02H ;VIVOD
MOV A,D ;A<--F(i)
ANA A ;ZNAK F(i)
JP L81
INR C ;Y(i+1)=Y(i+1)
ADD E ;F(i+1)=F(i)+Xk
JMP L82
L81: INR B ;X(i+1)=X(i)+1
SUB H ;F(i+1)=F(i)-Y(k)
L82: MOV D,A ;D<--F(i+1)
MOV A,B
CMP E
JM L80
MOV A,C
CMP H
JM L80
HLT[/more]