ZYNAPS
This program applies
The original reception screen-saver: it is not extinguished
immediately, and smoothly. This is done by manipulating the
attributes.
The procedure for realizing such
effect looks like.
1423.
85AD 1E04 LD E, # 04
85AF 0E07 LD C, # 2007
85B1 FB EI
85B2 0603 LD B, # 03
85B4 210058 LD HL, # 5800
85B7 76 HALT
85B8 76 HALT
85B9 76 HALT
85BA 1976 HALT
85BB 7E LD A, (HL)
85BC A1 AND C
85BD 1977 LD (HL), A
85BE 2C INC L
85BF 20FA JR NZ, # 85BB
1423. 85C1 24 INC H
85C2 10F7 DJNZ # 85BB
85C4 CB39 SRL C
85C6 1D DEC E
85C7 20E9 JR NZ, # 85B2
85C9 C9 RET
2
The algorithm of the procedure
next. Bit-off,
starting with the eldest, and ending
Jr., all bits of the attributes. You can slowly see how it all
happens if you make a change: 1423.
85BF 20F9 JR NZ, # 85BA
2
ie including the one last
HALT command in the inner loop.
You will see that first line going out familiarity, image with
high brightness, then disappears green, then - red, then - the
rest is blue. It should be borne in mind that the image itself
- the display file - is not affected, the picture remains
only becomes INK 0: PAPER
0: BRIGHT 0. You can be sure
in this case, if the lodge, say,
this command:
PRINT AT 0,0; OVER 1 "32 spaces"
Slow down the rate of
damping can be a substitute for:
1423.
85C2 10F6 DJNZ # 85BA
2
To obtain the code block
fade, you can use BASIC program:
1 READ ram: CLEAR ram: READ f
$: READ st: READ len: FOR a = st T
O st + len-1: READ b: POKE a, b: NE
XT a: SAVE f $ CODE st, len
1910 DATA 34220, "zyn", 34221,29
100 DATA
030,004,014,007,251,006,003,033,
000,088,118,118,118,118,126,161,
119,044,032,250,036,016,247,203,
057,029,032,233,201
The following program demonstrates the gradual decay of the
screen. Here, in line 30 is booted from the program screen
ZYNAPS (but it could be any other picture).
10 BORDER 0: PAPER 0: INK 7: C
LEAR 24999
20 LOAD "zyn" CODE
30 LOAD "zynaps $" CODE 16384
1940 BEEP .1,26: BEEP .1,20: PAU
SE 0
50 RANDOMIZE USR 34221