ZX Review #7-8-9-10
08 ноября 1997

Studies - attribute scrolling text. "Gasilka" screen. A simplified version of the procedure, "Curtain". Procedure is enriched with pictures. Procedure display images on the points.

<b>Studies</b> - attribute scrolling text.
(C) L. Smirnov, Yaroslavl


   You wrote your a regular reader of Leonid Smirnov. I'm 
reading your magazine since 1994. My favorite topic - Etudes. I 
want to suggest to her a few programs.


   The first - an attribute running
line. It has a fairly short length (only about 90
bytes), and works quite
quickly. Here is its listing:
140.
LINE LD HL, # 5A01

        LD DE, # 5A00

        LD BC, 255

        LDIR

        LD HL, FLAG

        RLC (HL)

        JR NC, L1

        LD HL, (TEXT)

        INC HL

        LD (TEXT), HL

        LD A, (HL)

        OR A

        JR NZ, L3
INIT LD A, 1

        LD (FLAG), A

        LD HL, TXT

        LD (TEXT), HL

        LD A, (HL)
L3 LD L, A

        LD H, 0

        ADD HL, HL

        ADD HL, HL

        ADD HL, HL

        LD DE, (# 5C36)

        ADD HL, DE

        LD DE, BUFF

        LD BC, 8

        LDIR
L1 LD HL, # 5A1F

        LD DE, BUFF

        LD C, 32

        LD A, 8
L2 LD (HL), 66; background color

        EX DE, HL

        RLC (HL)

        EX DE, HL

        JR NC, L4

        LD (HL), 114; color of the letters
L4 INC DE

        ADD HL, BC

        DEC A

        JR NZ, L2

        RET

BUFF DEFS 8
FLAG DEFB 1
TEXT DEFW TXT

TXT DEFB "Atribute scroller,"

    DEFB "Written by Smirnov"
3 DEFB "Leonid 02.11.1996 ..."

    DEFB 0; end of the text
2

   Procedure must be called
every interruption, before using it to initialize, for example:


        CALL INIT

        RES 5, (IY +1)
A1 HALT

        CALL LINE

        BIT 5, (IY +1)

        JR Z, A1

        RET


   The second program - it is
one "gasilka" screen. With each pass across the screen values
PAPER and INK decreased by 1,
BRIGHT and FLASH are not changed.
140.
3; CLS, (C) Smirnov L.N. 1996

        LD B, 7
L1 LD HL, # 5800
L2 LD A, (HL)

        AND 7

        JR Z, L3

        DEC (HL)
L3 LD A, (HL)

        AND # 38

        JR Z, L4

        LD A, (HL)

        SUB 8

        LD (HL), A
L4 INC HL

        LD A, H

        CP # 5B

        JR NZ, L2

        HALT

        HALT

        DJNZ L1

        RET
2

   The next program - simplified version of procedure ML
Pletnev's "Curtain" (N1, 1995).
140.

        LD HL, # 5800

        LD B, 24
L2 LD C, # 1920
L1 LD (HL), 100
The color blind

        INC HL

        DEC C

        JR NZ, L1

        HALT

        DJNZ L2

        LD HL, SCREEN
; URL for an image

        LD DE, # 4000
; Throw a picture under the shade

        LD BC, 6144

        LDIR

        LD HL, SCREEN +6911
; The last byte of attributes

        LD DE, # 5AFF

        LD B, 24
L3 PUSH BC

        LD BC, # 20

        LDDR

        POP BC

        HALT

        DJNZ L3

        RET
2

   The following two procedures, I pulled out of the game by P. 
Tennis c Shadow monitor my Scorpion. The first is for

quenching, and the second - for the manifestation of the 
picture on the points. 140.


        LD B, # FA

        LD C, # FE

        LD HL, # 4000

        LD DE, # 1D
L1 LD A, (HL)

        AND C

        LD (HL), A

        ADD HL, DE

        LD A, H

        CP # 58

        JR C, L1

        SUB # 18

        LD H, A

        RLC C

        DJNZ L1

        RET


        LD HL, SCREEN

        PUSH HL

        LD B, # FA

        LD C, 1

        LD HL, # 4000

        LD DE, # 1D

        PUSH DE

        EXX

        POP DE

        POP HL

        EXX
L2 EXX

        LD A, (HL)

        ADD HL, DE

        EXX

        AND C

        RLC C

        OR (HL)

        LD (HL), A

        ADD HL, DE

        LD A, H

        CP # 58

        JR C, L2

        SUB # 18

        LD H, A

        EXX

        LD A, H

        SUB # 18

        LD H, A

        EXX

        RLC C

        DJNZ L2

        RET
2

           *







Other articles:

TR-DOS for beginners - The end.

Computer novella - Prince of Persia.

Computer novella - Laser team (the game Laser Squad).

Crossing Dragon - Game Rapscallion.

Crossing Dragon - Playing The Runes of Zendos.

Crossing Dragon - Playing The Saga.

Crossing Dragon - Game Witch's Cauldron.

Crossing Dragon - Create Adventyuru. Review of the editors.

Crossing Dragon - Create a dictionary to Adventyurnoy game.

Program, which we choose - The possible consequences of using undocumented commands.

Program, which we choose - About noticed irregularities in some programs and suggestions for future versions.

Program, which we choose - A proposal to all the authors of software, printers, memory dump. Programmers protect discs from being copied.

Program, which we choose - A few suggestions to improve the assembly.

Program, which we choose - Suggestions for refining ZX Word v2.5.

Program, which we choose - The "Spectrum emulator" v1.2.

Program, which we choose - What could want in a perfect assembly.

Retro - 40 best procedures: Copying data in memory.

Retro - 40 best procedures: Exchange token.

Retro - 40 best procedures: Determination addresses BASIC string.

Retro - 40 best procedures: Determination of the length of BASIC programs.

Retro - 40 best procedures: Determination of the amount of free memory.

Retro - 40 best procedures for: Search and replace strings.

Retro - 40 best procedure: Find the string.

Retro - 40 best procedures: Search for the string.

Retro - 40 best procedures: the list of variables.

Retro - 40 best procedures: an increase and up the screen.

Retro - 40 best treatments: Removal of REM-strings.

Retro - 40 best procedures: Remove the block of the program.

Expert Tips - Game Fredloader.

Expert Tips - Game Robin of Sherwood: The Touchstones of Rhianon.

Expert Tips - Game Scorpions: Die Machines.

Expert Tips - Game Terropods.

page iS-DOS - Description of system restarts IS DOS.

Forum - An algorithm for recognizing characters.

Forum - Time undocumented command processor Z80.

Forum - The concept of a high-color screen resolution.

Forum - A few Pokes to a game. Program Hacman96.

Forum - As for the new DOS and BIOS settings for the Spectrum.

Forum - Multicolor program on any computer model. Using the 2 nd screen Multicolor'a. Demonstration of the text. Electronic journals.

Forum - Project ZX Config.

Forum - Improve Art Studio. Ideas on file compression.

Forum - ZX Spectrum emulator for IBM. About the hexadecimal system. Program ZX-Stars. Oddities in the Elita

Forum - The effects on the curb and Multicolor.

reader-reader - ZX Spectrum 128 - new opportunities, new challenges.

reader-reader - With 'Light'. Spectrum and expert system.

reader-reader - The printer driver for the Scorpion.

reader-reader - Print numbers in different number systems.

reader-reader - Programming arcade game with scrolling screen.

reader-reader - The procedure for printing labels assembler XAS to monitor debugger STS 4.3.

Studies - attribute scrolling text. "Gasilka" screen. A simplified version of the procedure, "Curtain". Procedure is enriched with pictures. Procedure display images on the points.

Studies - Graphic effect "color bars".

Studies - Driver screen printing 64 characters per line.

Studies - Set of protective boot.

Studies - Address to the drive mode IM 2. Working with non-standard disc format.

Studies - Print the character, magnified by 8 times. The program "pouring" screen. The procedure for screen-saver on the points. Clear screen in Terminator'e. Search strings in memory. System character set conversion.

Studies - Program - cataloger of disks.

Studies - Program the output values of the amplitude channel music. coprocessor on the curb.

Studies - Program the output image.

Studies - The program plugs sprite.

Studies - Cleanup of the specified window screen.

Studies - The program sort the array in ascending order. The procedure for filling the screen specified attribute. Procedure display pictures. The effect of moving towards the stars. "Shower", coming from the upper left corner of the screen. The procedure of "shedding" pictures on the pixel lines. The program of "pulling" the picture at an angle of 45 degrees. Three procedures "Scroll".

Studies - The printing of numbers.

Studies - The procedure for drawing a character with attributes.

Studies - The procedure for display pictures. Fade-OUT effect (picture goes beyond the edge of the screen). Visual effect "Fountain." Fade-OUT effect, mimicking the TV off. Procedure "Ignition" pictures. The program continuously drawing a picture.

Studies - The procedure for drawing a line.

Studies - The procedure for making optimal symbol table.

Studies - scrolling lines of text in the specified window. Attribute scroller. Diagonal scrolling.

Studies - sprite scroller. Procedure display screen.

Studies - Short procedure indicating the amplitude channel music. coprocessor. Way to subtract a constant from a register pair HL.

Studies - The formula for calculating the day of the week.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
For Coderz - Decompiling programs - the revival of the old prog.
Softinka - On operating systems for Spectrum ChAOS and ZXVGS.
Tape and Disk - Adapting programs to the system TR-DOS (Part 3).

В этот день...   27 April