ZX Review #7-8-9-10
08 ноября 1997

Program, which we choose - A few suggestions to improve the assembly.

<b>Program, which we choose</b> - A few suggestions to improve the assembly.
(C) Ivan Roshchin, Moscow, 1997


      A few suggestions
to improve the assembly

1. If the assembler provides

   work with blocks of text,

   It is a command to delete you
   divided by a block of text. "But

   sometimes it is necessary about
   opposite team - UDA
   pour the entire text, but distinguished
   lennogo block.

2. The ability to turn distinguished
   lenny block of text in the commentary
   tary and vice versa.


                 Example


   LD A, 1; LD A, 1

   LD B, 2 <---->; LD B, 2

   CALL M1; CALL M1

   CALL M2; CALL M2


   Of course, the same results
   that can be achieved by using
   formation of conditional directives

   assembly, but offering
   emy way more intuitive.

3. When you write enough

   great program, we must all

   time to remember what tags you

   already used in it, otherwise

   You can re-define already

   existing label. There could

   to help such a possibility:

   you type a string with a label

   not thinking about the encountered
   chalas it in the text or not,

   and when the cursor is on

   tag, you press a certain

   key combination, and productivity
   reduces test: not whether the

   This label is already defined in

   program?

4. Structuring of the selected

   a block of text, ie after each
   Doi command transfer control
   of (JP, JR, DJNZ, RET) au
   cally inserted into an empty

   line. This increases udobochi
   taemost text.


                 Example

before conversion: after conversion

L1 LD A, (M1) L1 LD A, (M1)

   LD C, A LD C, A

   CALL SUBR1 CALL SUBR1

   DJNZ L1 DJNZ L1

   XOR A

   RET XOR A
M1 DB 4,5,6 RET


                      M1 DB 4,5,6


5. Translation numbers in a selected

   block of text from one system

   notation to another, such as

   how it was done in about
   shell "Revue."


                 Example

before conversion: after conversion


   LD HL, # 4000 LD HL, 16384

   LD DE, # 4001 LD DE, 16385

   ............. .............


6. Count of bytes occupied

   portion of the program, finding
   schemsya in the selected block tech
   hundred.


                 Example


   CALL M1

   LD A, 7

   LD (HL), A

   RET

   DB 12,34


   Result: 3 +2 +1 +1 +2 = 9 bytes.


7. Counting the number of cycles to a
   Thoroe are satisfied

   in a selected block of text to
   Manda (it may be necessary

   when programming MULTICO
   LOR'a).


                 Example


   XOR A

   LD (HL), A

   LD A, 6

   LD B, 4


   Result: 4 +7 +7 +7 = 25 cycles.


8. Everyone knows the directive ac
   Sembler DB, allowing op
   We define one or more

   bytes of data. In some

   cases may be more convenient

   be a shorthand way written
   B of this directive. To couple
   stimosti other Assemblée
   ramie is necessary to provide

   and reverse transformation

   (Entire text or selected

   block), which reduced
   quadratic form entries become

   in full.


                 Example


   was:


      DB # 12, # 34, # 56

      DB% 01110111,% 11101110


   was:


      DB # 123456

      DB% 0111011111101110


9. You can make the program more

   visual considerably facilitate
   chit her writing and debugging

   if instead of typing the CP and the following
   blowing her team of conditional
   Noah transfer control study
   to use a lot more on
   nyatnye operators:


                 Example


   was: was:

   ......... .........

   CP 13 IF A = ​​13 THEN JR M1

   JR Z, M1 LD A, (X)

   LD A, (X) IF A <(IX +5) THEN JP M2

   CP (IX +5) IF A <= E THEN JR M3

   JP C, M2 IF A <> (HL) THEN CALL M4

   CP E IF A = ​​0 THEN RET

   JR C, M3 .........

   JR Z, M3

   CP (HL)

   CALL NZ, M4

   AND A

   RET Z

   .........


   Instead IF A <(IX +5) can be null
   write and IF (IX +5)> A - Assem
   Blair himself will understand what

   teams to form the object
   dimensional code.


   Provision should be excited
   possibility of conversion "normal
   normal "program (of those
   incidentally or the selection) in

   this format, and vice versa (for

   compatibility with other ac
   Sembler).


           *







Other articles:

TR-DOS for beginners - The end.

Computer novella - Prince of Persia.

Computer novella - Laser team (the game Laser Squad).

Crossing Dragon - Game Rapscallion.

Crossing Dragon - Playing The Runes of Zendos.

Crossing Dragon - Playing The Saga.

Crossing Dragon - Game Witch's Cauldron.

Crossing Dragon - Create Adventyuru. Review of the editors.

Crossing Dragon - Create a dictionary to Adventyurnoy game.

Program, which we choose - The possible consequences of using undocumented commands.

Program, which we choose - About noticed irregularities in some programs and suggestions for future versions.

Program, which we choose - A proposal to all the authors of software, printers, memory dump. Programmers protect discs from being copied.

Program, which we choose - A few suggestions to improve the assembly.

Program, which we choose - Suggestions for refining ZX Word v2.5.

Program, which we choose - The "Spectrum emulator" v1.2.

Program, which we choose - What could want in a perfect assembly.

Retro - 40 best procedures: Copying data in memory.

Retro - 40 best procedures: Exchange token.

Retro - 40 best procedures: Determination addresses BASIC string.

Retro - 40 best procedures: Determination of the length of BASIC programs.

Retro - 40 best procedures: Determination of the amount of free memory.

Retro - 40 best procedures for: Search and replace strings.

Retro - 40 best procedure: Find the string.

Retro - 40 best procedures: Search for the string.

Retro - 40 best procedures: the list of variables.

Retro - 40 best procedures: an increase and up the screen.

Retro - 40 best treatments: Removal of REM-strings.

Retro - 40 best procedures: Remove the block of the program.

Expert Tips - Game Fredloader.

Expert Tips - Game Robin of Sherwood: The Touchstones of Rhianon.

Expert Tips - Game Scorpions: Die Machines.

Expert Tips - Game Terropods.

page iS-DOS - Description of system restarts IS DOS.

Forum - An algorithm for recognizing characters.

Forum - Time undocumented command processor Z80.

Forum - The concept of a high-color screen resolution.

Forum - A few Pokes to a game. Program Hacman96.

Forum - As for the new DOS and BIOS settings for the Spectrum.

Forum - Multicolor program on any computer model. Using the 2 nd screen Multicolor'a. Demonstration of the text. Electronic journals.

Forum - Project ZX Config.

Forum - Improve Art Studio. Ideas on file compression.

Forum - ZX Spectrum emulator for IBM. About the hexadecimal system. Program ZX-Stars. Oddities in the Elita

Forum - The effects on the curb and Multicolor.

reader-reader - ZX Spectrum 128 - new opportunities, new challenges.

reader-reader - With 'Light'. Spectrum and expert system.

reader-reader - The printer driver for the Scorpion.

reader-reader - Print numbers in different number systems.

reader-reader - Programming arcade game with scrolling screen.

reader-reader - The procedure for printing labels assembler XAS to monitor debugger STS 4.3.

Studies - attribute scrolling text. "Gasilka" screen. A simplified version of the procedure, "Curtain". Procedure is enriched with pictures. Procedure display images on the points.

Studies - Graphic effect "color bars".

Studies - Driver screen printing 64 characters per line.

Studies - Set of protective boot.

Studies - Address to the drive mode IM 2. Working with non-standard disc format.

Studies - Print the character, magnified by 8 times. The program "pouring" screen. The procedure for screen-saver on the points. Clear screen in Terminator'e. Search strings in memory. System character set conversion.

Studies - Program - cataloger of disks.

Studies - Program the output values of the amplitude channel music. coprocessor on the curb.

Studies - Program the output image.

Studies - The program plugs sprite.

Studies - Cleanup of the specified window screen.

Studies - The program sort the array in ascending order. The procedure for filling the screen specified attribute. Procedure display pictures. The effect of moving towards the stars. "Shower", coming from the upper left corner of the screen. The procedure of "shedding" pictures on the pixel lines. The program of "pulling" the picture at an angle of 45 degrees. Three procedures "Scroll".

Studies - The printing of numbers.

Studies - The procedure for drawing a character with attributes.

Studies - The procedure for display pictures. Fade-OUT effect (picture goes beyond the edge of the screen). Visual effect "Fountain." Fade-OUT effect, mimicking the TV off. Procedure "Ignition" pictures. The program continuously drawing a picture.

Studies - The procedure for drawing a line.

Studies - The procedure for making optimal symbol table.

Studies - scrolling lines of text in the specified window. Attribute scroller. Diagonal scrolling.

Studies - sprite scroller. Procedure display screen.

Studies - Short procedure indicating the amplitude channel music. coprocessor. Way to subtract a constant from a register pair HL.

Studies - The formula for calculating the day of the week.


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

Similar articles:
four kilobytes - With the start of the new school year!
Lozhenie - index: "Maybe you do not appreciate how I cut the word" application ", but ... "
News - Information about the game "RETURN TO HOME 5" (Deadly worlds invasion Torostoidov) game is a continuation of "RETURN TO HOME 4.
Our Town - On the city of Chelyabinsk.

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