KrNews #05
24 июля 1998

Coder - Quick procedure point.

<b>Coder</b> - Quick procedure point.

                CODING



      (C) Viper / Techno Laboratory


   After seeing other computer paper,
I found there sections on
programmers. I think that our (VASHA!)
Newspaper is not worse (in my opinion, even
better than many) and it's time to fill this
gap.

   Today there will be 4 treatments,
which are often used for
programming:


   1) rapid procedure point

   2) exchange of the two memory areas

   3) the rapid division

   4) the rapid multiplication



   1) Over this procedure, a long time I broke
head and invented (as it turned out later)
bicycle. But then I thought
procedure even faster (69 cycles), but its
I will not give you, if anyone should, that he
come up with. :-)

   This version takes 73 clock cycles for its
work must be 1024 bytes continuous
memory. Sub-create the tables call names CRT. Point coordinates 
are given by in DE (XY). Tables are falling down, that is

if PTY = # FE00, then another 3-sector below
will be used. In the procedure itself
points (ZIP) second team

               LD H, 'PTY
is nothing but an operation selection
High Byte (ALASM). Such a team
Available STORM, and as far as I
known ZXASM3. If your assembler does not
supports such things, ask
byte directly, although it is
uncomfortable.

 ; ZIP PLOT 1.4
 ; Author: Viper of TechnoLab
 , 73 Tacts, 4 Tables take four sectors


       ; PTY - Down HiB, LEN = 192

       ; PTX - Down LoB, LEN = 192

       ; ADX - Div8 Lin, LEN = 256

       ; PTB - BitSet N, LEN = 256


       PTY EQU # FF00

      ; PTX EQU # FE00

      ; ADX EQU # FD00> for help

      ; PTB EQU # FC00 /



       ORG 40000

       ENT


       CALL CRT

       LD DE, # 0909; coordinates of a point

       CALL ZIP

       RET

ZIP LD L, E

       LD H, 'PTY

       LD B, (HL)

       DEC H

       LD A, (HL)

       DEC H

       LD L, D

       ADD A, (HL)

       LD C, A

       DEC H

       LD A, (BC)

       XOR (HL)

       LD (BC), A

       RET

CRT LD HL, PTY; creating tables

       LD DE, # 4000; main screen

       LD BC, # C020
CR1 LD (HL), D

       DEC H

       LD (HL), E

       INC L

       INC H

       INC D

       LD A, D

       AND 7

       JR NZ, $ +12

       LD A, E

       SUB # E0

       LD E, A

       JR NC, $ +6

       LD A, D

       SUB 8

       LD D, A

       DJNZ CR1

       LD L, H; only for those addresses

       DEC H; in general LD ​​L, # FF

       DEC H
CR3 DEC C

       LD B, 8
CR2 LD (HL), C

       DEC L

       DJNZ CR2

       INC C

       DEC C

       JR NZ, CR3

       DEC H

       INC A
CR4 LD (HL), A

       RLCA

       DEC L

       DJNZ CR4

       RET




Other articles:

INTRO - Passed "Programmer's Day".

Event - appeared out in the INTERNET.

BBS-File - log XTR-MODEM/BBS v156!

SCENERGY - Profile of the journal SCENERGY.

Playing - Tips for passing games: Escape to Harhan, Stalker.

Ferrum! - scheme modem KrVicomm v1.0.

Ferrum! - The scheme to remove the modem Vic tube.

Ferrum! - How to get a good connection with the BBS.

Coder - Quick procedure point.

Coder - The exchange of the two memory areas.

Coder - Procedures for rapid cell division and multiplication.

Authors - the authors.

INCOMING - Description of the features of the game DAEMON.

MUZAKING - Music skeleton.

KrZxNet - On KrZxNet addressing.

P-Net - Open the node and hub P-Net.

Letters - Feedback from readers of the newspaper.

Talents - The lyrics "If you want PyTsy.

Talents - Russian Radio 101.8 FM.

Talents - dough on a computer from BLAZ'a.

PS - Post Scriptum - about changes in this version of the shell.

NEW GAME - The presentation of the game MIRROR.

Advertising - Advertisements and announcements ...


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

Similar articles:
Local News - A story about team of the city.
Presentation - All programs: What can FORTH?
Honor and Eternal - List of Honored Members AC Edit.

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