Mail - Scrolling to row up and down.

Odyssey Magazine #02
(C) E2 Soft CodeWalker, 1997
E-Mail: e2soft@extranet.ru
Music by Shov



         Hello, Dear!

   Prodlagayu to your attention a number of protsedurok.

   I hope that they will be very useful and applicable to 
everyday tasks. The purpose of this publication does not 
attempt a At first glance the correct procedure is that when 
the need to address this problem coder would not have invent, 
though simple, but the bike. The more so for SPECCY need simple 
and fast program and the need to save for details.


  All these procedures use
alternative registers for speed, so when you use from BASIC
HL alternative to save.


        Scrolling on the line up

  Uses a table with their work.

RAS EQU 7; just scrolled
                        ; Are 7 lines,

                        Lest the umklapp

                        , Describes the emptiness
UPSC LD B, 23, 23 lines

        LD HL, TABST
STT1 LD E, (HL); Line 1

        INC HL

        LD D, (HL)

        INC HL

        PUSH HL

        PUSH DE

        LD E, (HL); Line 2

        INC HL

        LD D, (HL)

        PUSH DE

        EXX

        POP HL

        POP DE

        LD BC, 32 * RAS; in the line of 32 bytes
LP PUSH HL

        PUSH DE

        DEFS 32, # ED, # A0

        EX AF, AF '

        POP DE

        INC D

        POP HL

        INC H

        EX AF, AF '

        JP PE, LP

        EXX

        POP HL

        DJNZ STT1

        RET



   Analigichno, scroll down the rows

DWSC LD B, 23

        LD HL, TABEN
STT2 LD D, (HL); 1-STRK

        DEC HL

        LD E, (HL)

        DEC HL

        PUSH HL

        PUSH DE

        LD D, (HL); 2-STRK

        DEC HL

        LD E, (HL)

        PUSH DE

        EXX

        POP HL

        POP DE

        LD BC, 32 * RAS
LPP PUSH HL

        PUSH DE

        DEFS 32, # ED, # A0

        EX AF, AF '

        POP DE

        INC D

        POP HL

        INC H

        EX AF, AF '

        JP PE, LPP

        EXX

        POP HL

        DJNZ STT2

        RET