?login_element?
?pathlinks? – Rev 344
Rev 61 |
Blame |
Compare with Previous |
Last modification |
View Log
| Download
DEP888
LD HL,FILE888TO
CALL LDDE11
LD HL,FILE888FROM
LD C,128
DEP CALL DEP3
CALL NZ,oldcl
JR NZ,COLQQ
EXX
PUSH HL
EXX
POP DE
PUSH BC
LD BC,#820
LD A,D
COL80 ADD A,24
LD D,A
LDI ;R
DEC E
ADD A,24
LD D,A
LDI ;G
DEC E
SUB 48
LD D,A
LDI ;B
DEC E
INC A
DJNZ COL80
POP BC
EXX
JR COLQ
COLQQ
EXX
LD A,H
COLQ INC L
JR Z,$+4
SUB 8
LD H,A
EXX
CP FILE888TO/256+24
JR NZ,DEP
CHLRLC LD C,(HL)
INC HL
RL C
RET
COL4
LD A,#40
CALL DEPCOL0
CALL PUTCOL
DJNZ COL4
RET
COL1
XOR A
CALL PUTCOL
DJNZ COL1
RET
oldcl
;любое число цветов, кроме 8
;A=1 - старое число цветов и старая палитра
;увеличивает H на 8
LD D,T888FOUND/256
DEC A
JR Z,COLOLD
LD LX,A
LD E,A
DEPTAB CALL DEP3
DEC E
LD (DE),A
JR NZ,DEPTAB
COLOLD LD A,LX
LD B,64
CP 4
JR NC,COL45O
DEC A
JR Z,COL1
DEC A
JR Z,COL2
;2=11
;1=10
;0=0
COL3
LD A,#80
CALL DEPCOL0
JR Z,COL3N1
SLA C
CALL Z,CHLRLC
RLA
DEC A
COL3N1 CALL PUTCOL
DJNZ COL3
RET
;1=1
;0=0
COL2
LD A,#80
CALL DEPCOL0
CALL PUTCOL
DJNZ COL2
RET
COL45O
JR Z,COL4
RRA
JR C,COL5
;5=111
;4=110
;3=101
;2=100
;1=01
;0=00
COL6 LD A,#40
CALL DEPCOL0
CP 2
JR C,COL6N1
DEC A
SLA C
CALL Z,CHLRLC
RLA
COL6N1 CALL PUTCOL
DJNZ COL6
RET
;0=00
;1=01
;2=10
;3=110
;4=111
COL5 LD A,#40
CALL DEPCOL0
CP 3
JR C,COL5N1
SLA C
CALL Z,CHLRLC
RLA
SUB 3
COL5N1 CALL PUTCOL
DJNZ COL5
RET
PUTCOL
LD E,A
LD A,(DE)
EXX
RRA
RL E ;B
RRA
RL D ;R
RRA
RL C ;G
JR NC,EXXRET
LD (HL),E ;B
LD A,H
ADD A,24
LD H,A
LD (HL),D ;R
ADD A,24
LD H,A
LD (HL),C ;G
SUB 47 ;INCH
LD H,A
LDDE11 LD C,1
EXXRET EXX
RET
DEP3 LD A,#20
DEPCOL0 SLA C
CALL Z,CHLRLC
ADC A,A
JR NC,DEPCOL0
RET