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

Retro - 40 best procedures: the list of variables.

<b>Retro</b> - 40 best procedures: the list of variables.
    8.5. Listing

          variables


  Length: 94

  Number of variables: 0

  Checksum: 10295

  Purpose: This subroutine
is a list of names of all the variables available in this
currently in memory.

  Calling the program:

     RANDOMIZE USR address

  Error checking: If the variables in the memory is not, the 
program returns to BASIC. 

  Comment: This is a big help in debugging programs, 
particularly long and complex. 


   LISTING machine code
Assembly label number to VVODA147.


       RES 0, (IY +2) 253 203 2134

       LD HL, (23627) 42 75 92
N_VAR LD A, 13 62 13

       RST 16215

       LD A, 32 62 32

       RST 16215

       LD A, (HL) 126

       CP 128 254 128

       RET Z 200

       BIT 7, A 203 127

       JR Z, BIT 62 May 1940

       BIT 6, A 203 119

       JR Z, N_BIT 40 31

       BIT 5, A 203 111

       JR Z, STR_AR 40 9

       SUB 128 214 128

       LD DE, 19 17 19 0
PRINT RST 16215

       ADD HL, DE 25

       JR N_VAR 24225
STR_AR SUB 96 214 1996

       RST 16215

       LD A, 36 62 36
BRACK RST 16215

       LD A, 40 62 40

       RST 16215

       LD A, 41 62 41
POINT INC HL 35

       LD E, (HL) 94

       INC HL 35

       LD D, (HL) 86

       INC HL 35

       JR PRINT 24234
N_BIT BIT 5, A 203 111

       JR Z, ARRAY 40 19

       SUB 64 214 1964

       RST 16215
NEXT_C INC HL 35

       LD A, (HL) 126

       BIT 7, A 203 127

       JR NZ, LAST_C 32 3

       RST 16215

       JR NEXT_C 24247
LAST_C SUB 128214128
JUMP LD DE, June 17 6 ​​0

       JR PRINT 24211
ARRAY SUB 32 214 1932

       JR BRACK 24216
BIT 5 BIT 5, A 203 111

       JR NZ, JUMP 32243

       ADD A, 32 198 1932

       RST 16215

       LD A, 36 62 36

       JR POINT 24211
2

  How it works:

  Bit 0 bytes at 23612
reset to the characters that appear on print, appeared in
top of the screen. In HL load address of the variables. As the 
battery is loaded ENTER sign and the routine is called ROM, at 
16. In battery is then loaded

code space, and called again
the same routine ROM.

  As the battery is loaded bytes
the address in HL. If the value
this byte is equal to 128, the program returns to BASIC, because
reached the end of the field variables.

  If bit 7 of accumulator set to 0, the program continues
to BIT 5 because met a string variable or number, name
which consists of only one
letters. Verified 6-bit accumulator. If it is 0, a transition 
is made to N_BIT, because identified an array or a number, 
whose name more than one letter. If Bit 5 of the battery is 0,

program goes to STR_AR.

  The program reaches this point, if found variable
is the control variable
Cycle FOR / NEXT. In this case,
Battery subtracted 128 -
the result is the character code for printing. In a couple of
DE loads the number 19, indicating the following variable in the
are added to HL. Symbol in the battery is printed, DE
added to HL, and the program
returns to search for the next
variable N_VAR.

  If the program finds a string array (up STR_AR),
then subtracted from the accumulator
number 96, which gives the code name
found in the array. This value is printed using a sub-ROMs. Sign
dollar and the left parenthesis are printed, and the battery
loaded code right parenthesis.
HL increased, indicating
bytes containing the length of the array.
This value is loaded into the DE,
so that the addition of HL gives
address of the next variable. A transition is made to PRINT, 
where the right bracket prints and DE is added to the HL.


  The procedure is verified N_BIT
Bit 5 of the battery. If it is set to 0, ie a numeric
array, then a transition to
ARRAY. If it is set to 1,
is a numerical variable name
which is longer than one letter. Subtracted from the accumulator
64, and the resulting
symbol is printed. The program then executes the loop,
print each character who met as long as there is at least one 
character with bit 7 set to 1. From

code of last character
subtract 128, DE loaded offset for next variable, and the 
program jumps to PRINT.


  If the array is found, 32 is subtracted from the battery to
get the correct code, and a transition is made to find the 
brackets - BRACK.


  The procedure BIT 5, if found the number with a name that has
only one letter, programmb
back to JUMP.

  End of sub work when the meeting variables - string. Addition
32 to the battery provides the code for
printing. Finally, the battery is loaded character code
the dollar and made the transition to
POINT.






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:
Glyukodrom - glitches determine whether the mouse - an actual procedure from Stranger'a.
Our guests - The group - Virtual Vision group.
From pedaktsii - From the authors.
Hee-hee-Hit Parade - best pop group of five songs.

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