Body #07
25 июня 1997

PUSH HL - The procedure for the withdrawal point.

<b>PUSH HL</b> - The procedure for the withdrawal point.
                           PUSH HL

(C) SATSOFT PHN 270-72-36

Today I continued HEADINGS Codenamed 'PUSH HL' and
Bring to your attention a very simple procedure for deriving
POINT ON THE SCREEN:

; OUT POINT
    ORG 40000
    LD D, 10; x coordinate
    LD E, 11, Y coordinate
    LD A, # AF; CALCULATION OF ADDRESSES TO COORDINATES
    SUB E
    RET C
    LD E, A
    AND A
    RRA
    SCF
    RRA
    AND A
    RRA
    XOR E
    AND # F8
    XOR E
    LD H, A
    LD A, D
    RLCA
    RLCA
    RLCA
    XOR E
    AND # C7
    XOR E
    RLCA
    RLCA
    LD L, A

Now we know the Segment number, series, columns and LINES. ALL 
OF THESE Data stored in the register pair 'HL'. TK THIS LINE IN

Familiarity has 8 pixels, and SHOULD INCLUDE ONLY ONE
, SO SHOULD GET ANY BIT want to include.
In fact, his number is determined by the modulo
COORDINATES FOR X 8, A computes this balance - BY
MASKING OF FIVE bits. But the fact that the coordinates X
CHANGES LEFT TO RIGHT, IE 0,1,2,3 ,..., 175, and the number of 
bits in Bytes FOUND APPROPRIATE LINE GOING THE OTHER WAY, IE

7,6,5 ,..., 0.POETOMU TO DO CONVERSION. IN CASE 'A'
Enter a number '# FE' (11.11111 million), and then make ROTATION
This byte N +1 times, where N - Modulo X ON 8.

    LD A, D; x coordinate
    AND # 07; MASKING
    LD B, A; remainder of dividing x by 8
    INC B; +1
    LD A, # FE; PUT BYTE 11111110
LOOP RRCA; ROTATION N +1 TIMES
    DJNZ LOOP
    LD B, # FF; INVERSION TO SEAL POINT WAS BLACK
    XOR B; ON WHITE
    LD B, A; REMEMBER IN CASE 'B'
    LD A, (HL); B 'A' in Georgia VALUE OF SCREEN
    OR B; including the required BIT
    LD (HL), A; GEORGIA SCREEN RESULTS
    RET; OUT OF PROCEDURE:)

Command instead of 'OR B' CAN BE USED 'XOR B' AND SEAL TO BE
PERFORMED BY XOR'U. The idea is, everything should be 
understandable, since PROGRAM IS VERY SIMPLE AND TO HER IN 
ADDITION providing extra Number of comments.


WRITE ABOUT ALL THAT YOU ARE INTERESTED TO assembler SOUND
PREDELAH.PRISYLAYTE their programs, and I'll definitely (!)
Publish.





Other articles:

GAME Review - Game Description Emlyn Hughes International Football.

PUSH HL - The procedure for the withdrawal point.

Let's laugh - The results of the competition answer the questions. Competition for the funniest anecdote, case of life. 25 jokes from the publisher.

From the authors - A newspaper's letter BROM'a.

Advertising - Advertisements and announcements ...


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

Similar articles:
Press - an overview of the newspaper "Paragraph number 1" - Wlodek Black.
perverts - Sex Telephone.
Programmers - Basic for Dummies - Part 5.

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