Impulse #02
31 декабря 1997

Programmers - Quick procedure drawing a circle.

<b>Programmers</b> - Quick procedure drawing a circle.

             PROGRAMMERS


                                                      (C) JAGUAR


   Today in the section 'Programmer' I have prepared for you
number of different routines, including
where you'll find:


 - Quick procedure vycherchiva
   of the circle.

 - Accelerated DECRUNCHER to PA
   kovschiku DATA_SQUEEZER v4.x.

 - Correct handling of disk

   errors in the formation
   schenii to TR-DOS by # 3D13.

 - As well as some more detail,

   which are prepared specially
   exponentially for beginners program
   Misty, experienced the same ... MAKERy

   can not even look at

   these lines, but instead limit
   dlagayu you experienced, collect
   camping, and write us some
   something his cunning subspace
   gram, which we will publish

   in the next edition of the newspaper.



   Correct handling of disk
mistakes I have decided to publish in
this newspaper despite the fact
that this topic has already been considered
in the computer edition REHO 3
(ECHO), but since that was written about it there at all
is not a "proper treatment" - this is only correct failover in 
the event of an error, try while reading the press on

BREAK and your program
immediately fly to some ...
(Eg 12345 or to the address
at 23,456.



             *



   Begin, as promised, with a procedure drawing on the screen
circle. At the entrance to procedure
you must specify three parameters:
akkamulyatore in the radius, a senior
byte of IX (HX) - coordinate of the center of the circle along 
the axis Y, and younger (LX) - coordinate

Center for X. For example, to
draw a circle with a radius
80 in the center of the screen treatment
the procedure CIRCLE will look like:



        LD A, 80

        LD IX, # 6080

        CALL CIRCLE

        RET

CIRCLE LD E, 0

        LD H, E

        LD L, A

        LD D, A

        DEC D

        SRL L

        INC L
C1 PUSH DE

        LD A, D

        LD D, 0

        BIT 7, H

        JR NZ, C2

        SLI E

        RL D

        SBC HL, DE

        POP DE

        JR C3
C2 SUB E

        DEC A

        ADD A, A

        RL D

        LD E, A

        ADD HL, DE

        POP DE

        DEC D
C3 PUSH HL

        LD B, D

        LD C, E

        PUSH DE

        CALL CIR1

        LD A, B

        LD B, C

        LD C, A

        CALL CIR1

        POP DE

        POP HL

        INC E

        LD A, E

        CP D

        JR C, C1

        RET
CIR1 LD A, B

        ADD A, XH

        JR C, C4

        LD D, A

      LD A, C

        ADD A, XL

        JR C, C4

        LD E, A

        CALL CIR2
C4 LD A, XH

        SUB B

        JR C, C5

        LD D, A

        LD A, C

        ADD A, XL

        JR C, C5

        LD E, A

        CALL CIR2
C5 LD A, XH

        SUB B

        JR C, C6

        LD D, A

        LD A, XL

        SUB C

        JR C, C6

        LD E, A

        CALL CIR2
C6 LD A, B

        ADD A, XH

        RET C

        LD D, A

        LD A, XL

        SUB C

        RET C

        LD E, A

        CALL CIR2

        RET
CIR2 LD A, D

        CP 192

        RET NC

        LD A, E

        CPL

        AND 7

        ADD A, A

        ADD A, A

        ADD A, A

        ADD A, 199

        LD (BITNUM +1), A

        SRL E

        SRL E

        SRL E

        LD A, D

        AND 56

        RLCA

        RLCA

        OR E

        LD L, A

        LD A, D

        AND 7

        LD E, A

        LD A, D

        AND 192

        RRA

        SCF

        RRA

        RRA

        OR E

        LD H, A

        XOR A
BITNUM SET 0, A

        OR (HL)

        LD (HL), A

        RET



             *





Other articles:

Entry - The new wrapper for the newspaper.

Charts BBS - Graphs of BBS.

Bottle rosin - The controller for BZ128 Computer "Byte".

Programmers - Quick procedure drawing a circle.

Programmers - Fast Decruncher to packer Data-Squeezer v4.x.

Programmers - Correct handling of disk errors that occur when accessing the TR-DOS by # 3D13.

Story - Novella to play "Pulp abbtstvo" (La abadia).

AMIGA4EVER - On the Amiga scene.

Story - The story "The New Adventures of Winnie the Pooh" (Chapter 3.4).

Advertising - Advertising and announcements.

Conclusion - Conclusion.


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

Similar articles:
Advertising - advertising and announcements.
Story - "Seven Days - Seven Nights."
Smoothing Images - An algorithm of smoothing of static images.
News - the second issue of the journal Tomsk ZX-PLATINUM.

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