ZX Review #3-4
22 июля 1997

Forum - M. Bekarev. The calculation of the address display area of familiarity, and vice versa.

<b>Forum</b> - M. Bekarev. The calculation of the address display area of  familiarity, and vice versa.
(C) Bekarev Michael
Krasnoyarsk.


   I am a longtime fan of the ZX (and computer magazine). In 
general, try their hand at programming. Initially, in BASIC, as 
well as everything, and now transferred to the machine code and 
is very sorry that has not been able to overcome the so-called 
psychological barrier the transition from BASIC in ASSEMBLER. 
The striking difference! Not only in speed, but also in 
availability. In the codes communicate with a processor with a 
good friend, about all you can talk to. 

   Starting to learn assembler
I ran into a problem calculating the address display area for
familiarity and vice versa. And I decided
this problem came with the tablet. Use it is not easy
and very easy!

   For example, we need to calculate the address of familiarity 
with coordinates y = 11, x = 18.



           H L

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


               4 2 1 Number of rows 0 .. 7


          Aug. 16 4 2 1 Y 0 .. 23


                               Aug. 16 4 2 1 X 0 .. 31


           February 1 Segment number 0 .. 2


     1 Address Screen



   Watch and type in the table
on the line Y number 11 and note
it in the bottom row of Address
screen.

   Number 11 is typed on 8
High Byte and 2,1 junior.


      1 1 1 1



   Now we collect the X number of
18, is 16 and 2 low byte


      1 1 1 1 1 1



   You can even find out what the address will have 3 line in 
this familiarity, adding the line table "line number" number 3

High byte:


      1 1 1 1 1 1 1 1



   Now we see this as a
bit-byte layout
register (eg, HL).


      1 1 1 1 1 1 1 1

 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


   Consequently, the high byte
H = (64 +8 +2 +1) * 256 = 19200, and the youngest 64 L = 32 16 
+2 = 114, and hence address is 19200 114 = 19314.

You can even see that the address
is in the first segment of the screen, as enabled bit over 1
in line "segment number".

   Inverse telecine is even easier.
Expanding the address of the screen in bits
it is easy to find the coordinates, considering even the 
fingers. 

   Unit in the high register
(Bit 6) is required because it
beginning of the address screen (64 * 256 =
16384).

********************************





Other articles:

TR-DOS for beginners - Part 1.

Authoring - General Sound - Multimedia for the ZX Spectrum!

Business Card - Introducing the new electronic journal "Major Wares" (c) Codebusters & VMG

Computer novella - Knight Lore "legends of chivalry times."

New Programs - I. Roshchin. HELP_Z80. Davydov. Catalog's Base v1.8.

description of the shell of the journal "ZX-REVIEW"

Crossing Dragon - Aavlon, Castle of Dreams, Erik the Viking.

Crossing Dragon - Eureka!, Eye of Bain, Kentilla.

Crossing - Sherlock, Apollo, Shadows of Mordor, Rigels Revenge, Temple of Terror, ID, That's the Spirit, Return to Ithaka.

Retro - Dzh.Hardman, E. Hyuzon. Top 40 procedures.

Expert Tips - Castle Master.

Expert Tips - Firelord.

Expert Tips - Stonkers.

Forum Games - Insult Megademo, Catch 23, Livingstone, Rock Star ate my Hampster, UFO-2: Devils of the Abyss, Terminator 2, Venturama, The Spririts, Nipper, Sweewo'S World, King's Bounti -2, Hacker 2, Black Magic, Satcom, Star Heritage.

Forum - A. Gura. Code programmer.

Forum - A. Strelnikov. Prospects of development of ZX Spectrum.

Forum - Davydov. According to materials published in the ZX-REVIEW: Some issues related to autostart BASIC programs. Redefine Keys. How to print 42 characters per line. The procedure of multiplication HL = B * C. Refinement cloning downloaders. Mini-driver disk.

Forum - With 'Light'. Music processor ZX-Speccy.

Forum - Dmitry Fyodorov: Print images with a mask with pixel precision. Algorithm for calculating the address coordinates to within a pixel.

Forum - I. Roshchin. Sharing ZX ASM 3.0 and STS 5.1.

Forum - M. Bekarev. The calculation of the address display area of familiarity, and vice versa.

Forum - VP Fedin. Refinement Profi for conflict-free peripheral connectivity.

Forum - S. Astrov. Pseudorandom number generator.

reader-reader - V. Sirotkin. Protection program (look at the problem).

reader-reader - I. Roshchin. Display driver for the computer, "Pentagon-128.

Studies - A. Savinov: The procedure for displaying a double-height characters. Procedure "dissolution" of characters.

Studies - A. Urzha. The procedure for drawing a circle.

Studies - V. Sirotkin. Program checksum.

Studies - E. Volchkov. Improvement routines address calculation system on display file.

Studies - E. Frost. Running line.

Studies - I. Komandin. The program display screen.

Studies - I. Roshchin. Two graphic effect.

Studies - M. Lazutov: The modernization program font. Program encode / decode block codes. The effect of the attributes.

Studies - O. Smolyankin: Procedures for cleaning the screen. Output of text messages on the screen.


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

Similar articles:
BIRTHDAY - Happy Birthday Alex Stranger.
Lit. Page - Humor and the story "In the New Year."
News - There was a lot of electronic media.
Parallel Worlds - an overview of the computer models Macintosh.

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