ZX Review #5-6
04 ноября 1997 |
|
Forum - Program "Flame" and "Dragon."
(C) Telitsin S., Nizhnekamsk I am a passionate lover of the spectrum and ZX REVIEW I read the first issue, but it did not bother to write - somehow not up to it. Go directly to the case. Suggest to your competition studies a small program. It is written, though not by me, but I bring it to the author's permission Mihal Soft °. This so-called "Flame". org 5CD0h begin: ld bc, 3E8h loop_1: dec bc ld a, b or c jr nz, loop_1 ld de, 5B00h ld b, 20h loop_2: inc hl ld a, h and 1Fh ld h, a ld a, (hl) rra ld a, 0 jr c, loop_3 ld a, 3Fh loop_3: ld (de), a inc de djnz loop_2 ld ix, 57FFh ld bc, 300h loop_4: ld a, (ix +32) add a, (ix +33) add a, (ix +34) add a, (ix +65) srl a srl a jr z, loop_5 dec a loop_5: inc ix ld (ix +0), a dec bc ld a, b or c jr nz, loop_4 ld a, 7Fh in a, (0FEh) rra jr c, begin ret Fucking nice, is not it right? In addition, if you use a second screen on the 128K-machine, you can do this: on one screen familiarity 2 colors on the other two, and in the course of the beam switch every 4 rows. Thus, the resolution increase in 2 times. Ca. Ed.: The above effect, as easy to see, depends on the content Memories # 5B20-# 5B3F, which is not defined in the program. Therefore, before starting the effect is better to set the values these cells (eg, equal to 0 or # FF), that the effect did not depend on random numbers that could be there. Besides, I want to offer interesting, in my opinion, the subject for discussion (fractals and graftaly - what it is), and example, offer a small example of my own: "Dragon": 140. X_Y EQU # 4040 ORG 40000 DI LD BC, X_Y CALL PRINT LD D, 0 LD E, 1 BEGIN LD A, E DEL_2 SRL A JR C, NECET JR DEL_2 NECET RLA LD H, A SRL H SRL H SLA H SLA H SUB H LD H, A CP 1 JR NZ, NE_1 LD A, D AND A JR Z, D_03 DEC D JR DALEE NE_1 INC D JR DALEE D_03 LD D, 3 DALEE LD A, D CP 4 JR NZ, DALE2 LD D, 0 DALE2 LD A, D AND A JR Z, _0_2 LD A, D CP 1 JR Z, _2_0 LD A, D CP 2 JR Z, _0__2 LD A, D CP 3 JR Z, __2_0 PP1 INC E JR NC, BEGIN EI RET _0_2 INC C CALL PRINT JR PP1 _2_0 INC B CALL PRINT JR PP1 _0__2 DEC C CALL PRINT JR PP1 __2_0 DEC B CALL PRINT JR PP1 PRINT PUSH BC PUSH DE CALL 8933 POP DE POP BC RET 2 Here is given a short cycle for simplicity, in addition, there are no special tricks - everything must be absolutely clear. *
Other articles:
Similar articles:
В этот день... 21 November