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

Studies - Program - cataloger of disks.

<b>Studies</b> - Program - cataloger of disks.
(C) Kettle, Len.obl., P.Sovetsky


   I have long hesitated to write
you. But here is at an impasse, I
simply no one with whom to consult.
Everyone I know and who has the Spectrum, not moving
more toys. I took Basic and now trying his hand at
assembler. I subscribed to the second year of your magazine 
"ZX-Revue" and I think that your face has found a better 
companion and teacher. AND Now I ask to help.


   The fact that I have long sought
normal cataloger. But to no avail - one "hangs", the other does 
not sort, and the third is not looking program does not mark 
the fourth, etc. Then I undertook to write himself. Program I 
wanted to do as convenient and as they say, friendly, moreover, 
with auto-search on the disk. That even a first grader could it 
unprompted use. 

   The point seems to be gone. I have guides on memory, written 
procedures, designated buffer, almost finished

logical part of ... But I
found that 48 KB of memory (with program) I have enough for
processing only a 16-20 drive. Want to be treated not
BASIC-only blocks, and all the files, or to choose from - 
whatever. And I should add that I have more 50 floppy disks 
(bought wholesale from the former sinklerista, peresevshego on 
IBM), and on this I'm not going stop.


   But, you see, it's funny -
load data from disk in parts and not use all the memory - 256 
KB! Yes, yes, yes. I went to the chief - I

Scorpion! But I, to my great shame and to the great chagrin,
do not know how to use this miracle machine, "one hundred 
percent." Neither BASIC, no codes. Read

a bunch of literature and everywhere ran to the mysterious 
hints of port # 7FFD. Sorry, the experiment failed - my GENS-4D 
is not accepts commands with full decoding of the output port. 
There have I still TASM 4.0, but the reason not to ship the 
object code. Through shadow monitor too

tried to encode directly to memory, but disassemble their
Codes can only see OUT (# FD), A.
What should I do? The books and pamphlets
This theme is so concise and contradictory, that I utterly 
confused. In addition, there are three mode 128beysika 
podprogrammki sharing of memory pages, but here

question - how to use them?

   Dear Editors, I hope you
understood my difficulties and will not disregard my question.
I would greatly appreciate it. Tell me whether you can organize 
data processing in a loop from one bank of RAM to the transfer 
of results to another? Which banks and at what addresses can be 
set? How is it done from BASIC and from native code? What 
Conflicts provide? Of course, I was primarily interested in the 
Scorpion-256. 

   Now some will tell you about
my idea Autosearch files
data. When you log into the program directory it asks for the 
current date: 6 digits, or you can organize a menu interface

and obvious choice of dates, having as a result all the same 6 
digits. When you reset the data file on disk

These figures will be included in the file name automatically. 
The next time you start the program will not have to remember 
the file name or date - The program itself will find it by

the principle of "more-less", the only - after 1999 must
will replace the floppy.

   Well, perhaps that's all. I will
hopefully waiting for your response
as well as help other readers best magazine "ZX-REVIEW!


   Prim Ed.: Yes, sooner or later someone
had to ask a similar question. And now
finally have a reason to fully illuminate the pages of our 
magazine to work with pages. Let's start from the beginning. In

all machines with 128 KB of RAM is present
expansion port with address # 7FFD. Its structure is as follows:

Bits

 7 - not used
 6 - not used
 5 - latch. When writing to this bit 1 port

     blocked. This is necessary for the transition
     water machine in the 48 kb mode. Currently locked
     SC can only be removed to reset button

     Reset.
 4 - Select ROM. When recorded there 0 -

     imprinted ROM BASIC-48. If there

     record 1, then the imprinted ROM Bay
     Sika-128 and simultaneously blocked

     the inclusion of there ROM TR
     DOS. This is needed because at addresses

     # 3D00 - # 3DFF in this ROM is

     program. When the ROM Basie
     ka-48 lock TR-DOS withdrawn.
 3 - selection screen. These machines have two

     screen area. 0 - is the standard

     screen with the address # 4000. 1 - second equivalent
     wounds, located in the bank 7. It can

     be printed with the address # C000. His

     structure is identical to the usual
     nym.
 2 - Selection of pages of RAM. Page with a given
     nym number (0-7) is imprinted with

     Address # C000. But! Pages with index
     ramie 2 and 5 are also fixed on
     hodyatsya addresses: 2 - # 8000, 5 -

     # 4000. Ie 0 screen essentially

     is in page 5. Thus,
     Thus, when dealing with the extended parameter
     myatyu should circumvent these pages

     because they already used.


   But, as you may have noticed, 8 pages
16 KB - is 128 KB. But Scorpio 256 KB.
What about the rest of memory? To do this in Scorpio introduced 
yet another expansion port, which was not in the 128th 
machines. His address - # 1FFD. That's what its structure:


Bits

 7 - not used
 6 - not used
 5 - gating Centronix. This signal

     used with the printer.

     Short-term setting it to 1 st
     vorit printer that it tread
     whether the data.
 4 - The most important bit. With his help and yn
     ravlyaetsya additional memory. If

     it is set to 0, then by port # 7FFD

     switch to page 0 - 7, when

     it is set to 1, then switch

     page 8 - 15. Total 256 KB. Only

     it should be noted that the eighth page

     used shadow monitor. If

     zaportit its contents, the monitor

     will not work, and pressing
     tiyu Magic machine just freezes.
 3 - output RS232, through the bit transfer
     data are available for some types of prints
     moat.
 2 - not used
 1 - setting this bit to 1 causes

     that bit 4 port # 7FFD stops

     work, and is imprinted with the address 0

     Shadow ROM monitor. Setting this
     th bit to 0 will return all the places.
 0 - A very interesting thing. When filed

     there 1 with address 0 is imprinted zero
     curve page of RAM. Very useful for

     test your ROM version as well
     same with it, you can not get
     mediocre access to ports VG93!

     The idea of ​​this. We set this bit

     to 1 and make the transition to the address in the range
     tral range # 3D00 - # 3DFF. Work logs
     spacecraft controller, which should substitutions
     Thread ROM TR-DOS, and then switch
     you. Ports of a switch, and a ROM

     does not work ... And before we get into
     preliminarily prepared program

     which has full access to ports

     VG93 as long as management does not

     leaves the address # 3FFF. In the transition

     this limit, the ports on the switch
     versa. Setting this bit to 0 ver
     not all in order.


   So, give an example of the procedure are imprinted with the 
address # C000 page number where (0-15) you put in the register 
A: 140.


        PUSH AF; save the page number

        AND # 07; distinguish the lower bits

        OR # 10, to include ROM 3beysika-48

        LD BC, # 7FFD; install the port # 7FFD

        OUT (C), A

        POP AF; restore the page number

        AND # 08; distinguish the MSB.

                      And He is the number of pages.

        RLA; in the port it will be 4 bits, not 3.

        LD B, # 1F; change the port address at # 1FFD

        OUT (C), A; set the port # 1FFD.
2

   Naturally, the stack and the procedure itself is not
should be higher than # C000. Please
attention to the command OUT (C), A! Obviously,
have you tried to dial OUT (# 7FFD), A. This
teams do not. Port address in this command -
only one byte. To access the port,
whose address is specified by two bytes, we must
use the command OUT (C), A, downloading
pre-addressed to a port in BC.

   Now, how to work from BASIC.
Exactly the same. In principle, BASIC generally not suited for 
working with pages. BASIC-128 uses them only as Ram-drive and 
an additional buffer. Those routines, which you mentioned, it 
is absolutely useless. They are used by BASIC-128 for the 
exchange of ROM when calling routines from BASIC-48. Attention! 
These routines control is transferred also to interrupt, if 
enabled ROM beysika128. So, do not type in it at interrupt 
enable, if you're not sure their presence. This can occur if you

ran from 48 th BASIC. A better
do not touch it, because there is nothing useful there.

   For the same reason there is another nuance.
If you switch ports from BASIC, then
before you send value to port
# 7FFD, sure to put him in a cell
# 5B98. Without it, you can not switch
page - the first returns on the same interrupt
place the old one. The same applies to
assembler, if you decided to get into
ROM 128 of BASIC at interrupt enable. Though it better not mess
when working with the port # 1FFD. ROM BASIC-128
unaware of its existence and very
surprised when the on-site 7 page which uses it to store some
its variables, suddenly turns out to be 15. Here
like all we can say on this
occasion.


          *







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:
little about yourself - Energy Group Welcomes You!
Contents

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