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

Studies - Driver screen printing 64 characters per line.

<b>Studies</b> - Driver screen printing 64 characters per line.
(C) Baytullin Timur, Ryazan


   I suggest your readers
display driver for printing from 64
character in the string. Briefly about it.
To display the character or control code that calls the 
subroutine PR64 with the character code in register A. Control 
codes: 

13 - ENTER
3 - HOME (AT 0,0)
22, row, column - setting

    print position (line =

    0 .. 23, column = 0 .. 63)
4 - INVERSE 1
5 - INVERSE 0
8 - to save the cursor position
9 - restore cursor position


   Codes 8 and 9, use an internal stack driver (32 saving).


   Symbols for the driver are stored in memory in the usual 
format, in the left half of familiarity. The driver uses the 
registers AF, BC, DE and HL. Variables marked

an asterisk should be placed
in memory as they are defined in
program, because used their
indirect addressing. Address of the font defined in the usual 
way in cell 23606.



   Dear Editors, Print, please, my address. I will
glad to correspond about the software programs MULTICOLOR'a and
also on the theory and practice of data compression (especially 
interested in using LZSS / PACK). 


   My address: 390029 Ryazan,
ul.Vesennyaya, 9 / 1, kv.29.
140.
3; 64x24 DRIVER
3; (C) 1996 TIM BYTE

PR64 LD HL, STATE

        LD C, (HL)

        BIT 0, C

        JR NZ, DOAT

        CP 1932

        JP NC, PRSYM

        CP 1922

        JR NZ, PR0

        LD (HL), 3

        RET
DOAT BIT 1, C

        JR Z, DO2

        CP 1924

        JR NC, FAIL

        LD (DCOR), A

        LD (HL), a

        RET
DO2 CP 1964

        JR NC, FAIL

        LD (STLB), A

        LD A, (DCOR)

        LD (STRK), A

        LD (HL), 0

        JP GETADR
FAIL LD (HL), 0

        RET
PR0 CP 1913

        LD HL, STLB

        JR Z, CR

        CP 3

        JR Z, HOME

        CP 4

        JR Z, ION

        CP 5

        JP Z, IOFF

        CP 8

        JP Z, SAVCO

        CP 9

        JP Z, RESCO

        RET
CR LD (HL), 0

        DEC HL

        INC (HL)

        LD A, (HL)

        CP 1924

        JR NZ, GETADR

        LD (HL), 0
, Or LD (HL), 23

        CALL SCROLL
; SCROLL - scrolling procedure
; Screen up
GETADR LD DE, (STRK)

        LD A, E

        SRL D

        AND # 18

        OR # 40

        LD H, A

        LD A, E

        AND 7

        OR A

        DEFW # 1F1F, # 1F1F

        ADD A, D

        LD L, A

        LD (SCADR), HL

        RET
HOME LD HL, 0

        LD (STRK), HL

        LD H, # 1940

        LD (SCADR), HL

        RET
IOFF XOR A

        LD (INV1 +1), A

        LD (INV2 +1), A

        RET
ION LD A, # F0

        LD (INV1 +1), A

        CPL

        LD (INV2 +1), A

        RET
PRSYM LD H, 0

        LD L, A

        LD BC, (23,606)

        DEFB 41,41,41,9

        EX DE, HL

        LD HL, (SCADR)

        LD A, (STLB)

        AND 1

        JR NZ, PR1

        LD B, 8
L1 LD A, (HL)

        AND # 0F

        LD C, A

        LD A, (DE)

        OR C
INV1 XOR 0

        LD (HL), A

        INC H

        INC DE

        DJNZ L1

        LD HL, STLB

        INC (HL)

        RET
PR1 LD B, 8
L2 LD A, (HL)

        AND # F0

        LD C, A

        LD A, (DE)

        RLCA

        RLCA

        RLCA

        RLCA

        OR C
INV2 XOR 0

        LD (HL), A

        INC H

        INC DE

        DJNZ L2

        LD HL, SCADR

        INC (HL)

        DEC HL

        INC (HL)

        LD A, (HL)

        CP 1964

        RET NZ

        JP CR

SAVCO LD (ASP), SP

        DI

        LD SP, (PBU)

        LD HL, (STRK)

        PUSH HL

        LD (PBU), SP

        LD SP, (ASP)

        EI

        RET

RESCO LD (ASP), SP

        DI

        LD SP, (PBU)

        POP HL

        LD (PBU), SP

        LD SP, (ASP)

        EI

        LD (STRK), HL

        JP GETADR

STRK NOP; *
STLB NOP; *
SCADR DEFW # 4000 *

        DEFS 64
BUF EQU $
PBU DEFW BUF
ASP DEFW 0
STATE NOP
DCOR NOP
2

   Ca. Ed.: Quite an interesting procedure. Just want to note 
one fact. Note that in sub-

SAVCO and RESCO during rearrangement of the stack
disable interruptions. In the original program this was not 
done, which could lead to an error at the time when the stack 
repositioned, there will be an interruption. After stack is 
designed only to 32 words, and if it will be filled at least 
half then unloaded there processing program

Interrupt registers zatrut the program itself.
To do this, we inserted a ban on team
interrupts.


           *







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:
From the Editor - Presentation of the first issue of the newspaper.
Stories - crime scenes.
Feedback - contact the publisher.

В этот день...   21 November