Voyager #02
19 октября 1998
  Софт  

Laboratory - Error in STS v6.2 and fixing it.

<b>Laboratory</b> - Error in STS v6.2 and fixing it.
(C) Ivan Roshchin, Moscow
Music BREEZE (C) MR.Z / HWC



       Error in STS 6.2 and its correction



     When referring to drive STS 6.2 (as well as more
older) believes that in register tracks SH
recorded the actual number of tracks on which
A magnetic head drive. But for a number
reasons in case the track may contain an incorrect value, and 
in this case, any operation with a disk will fail. 

     Suppose we loaded the STS with the drive 'A', and after 
loading the magnetic head is, For example, a 10-second track 
(track and register contents, respectively, equal to 10). 

     Establish Drive = 'B'. What if this happens? STS will not 
initialize the drive to install a magnetic head in the initial 
state (at zero track). STS will not execute the command and 
read the first got the title sector to find out what the track 
is magnetic head (like the TR-DOS). STS believes that and drive 
'B' magnetic head located on the 10 th track and move it to 10

steps back to position on the 0-th track
(To read the directory). If the magnetic head is truly at the 
10 th track or on the track with a smaller number, all will end 
well. Well, in Otherwise, you know - after a lengthy wait a 
border color changes to red, signaling a disk error. Moreover, 
we can not go back to the drive 'A' - STS

believes that he has already established a magnetic head on
0-th track, and it remained at 10-th ...

     Such troubles arise not only when
working with two drives, but, for example, when debugging their 
own programs to the disk, which alter the contents of the 
register lanes. Assembliruem such a program, run - and after 
This STS refuses to work with the disk. And the old version of 
STS generally stuck with disk errors ... 

     Fortunately, there is a simple way to overcome
this problem: just go to the TR-DOS, see the directory of the 
drive and return to the STS. In this case, the register tracks 
come into compliance the real situation of the magnetic head 
drive. 

     And if you go to the TR-DOS does not want (or not)? In 
this case it is necessary to introduce certain changes to the 
STS. How do you do it? 



     You can determine where the STS routine is called reading 
a directory (it is called and when change the drive), and 
before each call to execute its code that initializes the drive 
- and the problem is solved! But after some thought, I found a 
simpler way: Instead of initializing the drive to write to the 
register tracks some sufficiently large number (at least more 
than 160), for example, 255. In this case the STS at 
positioning of the 0-th track moves the magnetic head on the 
255 steps back, and wherever it was, it must be the 0-th track 
(which and required).


     Thus, changes made to the STS: subroutine
reading a directory is located at # E7F8, and called it the 
following command: # E495: JP # E7F8. At # E495 put the team go 
to the code that writes the register 255 in track. Here's the 
snippet: 


    LD A, 255, it puts the number in the register

                  ; Track

    LD DE, # 1E3A; in ROM TR-DOS:

                  ; # 1E3A - OUT (# 3F), A: RET

    CALL # E4D3; appeal to the TR-DOS ROM

    JR # E7F8; proceed to read the directory



     Where can you find for him a free place? By
at # E7CF find part of the program, reset the attributes of the 
screen. STS is sometimes used for their needs lower third of 
the screen (# D000-# D7FF), and it to be unnoticed, for it 
establishes a Null attributes.



        # E7CF: EXX

               LD HL, # D800

               LD DE, # D801

               LD BC, # 02FF

               LD (HL), L

               LDIR

               EXX



     Here and place our fragment:


    # E7CF: JR # E7DD; to bypass the fragment

    # E7D1: LD A, 255

           LD DE, # 1E3A

           CALL # E4D3

           JR # E7F8



     At # E495, respectively, put the team JP # E7D1. Well, it 
remains only to write the modified STS on disk - and can work 
with. 







Other articles:

Inform - was held in Moscow FunTop'98, Sergsoft Away Diogen etc.

Inform - The authors of the magazine.

Inform - a description of the shell magazine.

Inform - Flying greetz: greetings.

Locman - short story of the game "Escape to Harhan (prehistory of AiR'a).

Locman - Slacker: A list of passwords for the game Net Walk. Cheat-mode in the game Mnoster Land.

Kaleidoscope - On the new global projects in the Speccy: Monstr Land, fisherman, Net Walk, Head Ball.

Kaleidoscope - The new system programs: Art Work demo version, RUSH-Copy, Maxsoft Screen Packer v1.4.

Kaleidoscope - The presentation of the game EMPIRE demo version 3.00.

Tusovka - Full report with FunTop'98: introduction.

Tusovka - Full report with FunTop'98: part one. Welcome Miniintervyu with Grandpa and Mike Blum.

Tusovka - Full report with FunTop'98: Part Two. Miniintervyu with Hardwave Crew.

Tusovka - Full report with FunTop'98: Part III. Thoughts during the Music compo: Virtual Vision group, Rage Technology.

Tusovka - Full report with FunTop'98: Part Four. Opinions about the Demo compo from Logros, Daniil / Playgear.

Tusovka - Full report with FunTop'98: the second day.

Tusovka - the results FunTop'98.

Tusovka - the views of witnesses FunTop'98.

Tusovka - FunTop'98: Interview with Serzh Soft.

Skeleton - The scheme and the list of items to VICOMM-modem.

Skeleton - Dangerous otvetchaet for assaults on the General Sound.

History - In den GARGOYLE (History and softografiya).

History - On the Western Journal of Sinclair User 1982-1993.

Laboratory - Error in STS v6.2 and fixing it.

Laboratory - How to make friends ALASM v4.1 and STS v6.2.

Profi Club - Description of the GRF Viever v1.6b.

Profi Club - Music Editors in CP / M: ADJ, Synthmaster v1.3, Music.com.

Profi Club - Glitch in the View Screen v2.0 - what does it mean?

Mail - Letter from AiR'a with the revocation of the journal.

Advertising - Advertising and announcements.


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

Similar articles:
Story - Love is evil.
From the authors - Preparations are under way to hang your computer ...
Interview with Arty Noonzen - an interview with the organizer of Digital Reality.
A Tangled Web - has been introduced to use text editor Lara Croft.
News - News from the FLASH on 13.07.1997 year.

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