Deja Vu #06
30 сентября 1998

CODING - Driver read / write.

<b>CODING</b> - Driver read / write.
          Driver Read / Write

          --------------------


   Specifications:

1) The length - 166 bytes.

2) TURBO read / write.

3) Floppy Drive A-D.

4) The bug - do not hang up, unlike

   drivers, using chunks of MAGIC in

   TR-DOS.

5) Does not reset when the PC TURBO

6) Works best on 5.03, 5.04 and

   similar to them. At 1.5 can (?) Format
   nut track ...

7) Called by the same # 3D13, C = 5 / 6.

8) Can work and allowed interrupt
   vaniyah (but slow).

9) A simplified error handling: if the bits

   0-6 Register # 1F dropped - it is believed

   that there is no error. Otherwise - repeat.

A) You can change the Number of attempts to read

   and writing. If the sector is still no problem
   remains to (not written), it is determined but
   measures under the head track and is

   Repositioning (well, the word ...).

B) driver is necessary buffer for reading identification
   fikatora sector (6 bytes).

C) not really been tested ...


        ORG # 6000

        ENT
; Written by Max / CBX / BD
; XAS Assembler, 06.08.98.



        LD A, (# 5D16)

        AND 3

        LD (DRV +1), A; Number of drive.

        LD HL, # 4000

        LD DE, # 0000

        LD BC, # 1805

        CALL DRIVER

        RET


DRIVER DI

        LD IX, # 3FE5

        LD A, # 80

        BIT 0, C

        JR NZ, LD_MODE

        LD LX, # CA

        LD A, # A0
LD_MODE LD (CMD +1), A

        LD (PROC +2), IX
MAIN LD A, # 2C

        BIT 0, D

        JR NZ, DRV

        LD A, # 3C
DRV OR 0

        LD C, # FF

        CALL REG

        LD A, D

        RRA

        LD C, # 7F

        CALL REG

        LD A, # 18

        CALL CMD_RDY

        LD C, 8; Number of attempts.
ERR PUSH HL, BC

        XOR A

        LD (# 5CD6), A

        OUT (# FE), A

        LD A, E

        INC A

        LD C, # 5F

        CALL REG
CMD LD A, # 80

        CALL COMM
PROC LD IX, # 3FE5

        LD C, # 7F

        CALL TODOS

        LD BC, CONT

        PUSH BC
ONE LD BC, ONE

        PUSH BC

        LD B, # 01

        PUSH BC

        LD BC, # 2099

        PUSH BC

        JR DOS; Check # 1F.
CONT DI

        POP BC, HL

        LD A, (# 5CD6)

        AND A

        JR Z, NOERR

        DEC C

        JR NZ, ERR

        OUT (# FE), A

        PUSH HL

        LD HL, TRK_BF

        LD A, # C0

        CALL CMD_RDY

        POP HL

        LD A, (TRK_BF)

        LD C, # 3F

        CALL REG

        JR MAIN
NOERR INC H

        INC E

        BIT 4, E

        JR Z, CNT

        LD E, A

        INC D
CNT DJNZ MAIN

        EI

        RET
COMM LD C, # 1F
REG LD IX, # 2A53
TODOS PUSH IX
DOS JP # 3D2F
CMD_RDY CALL COMM

        LD C, # 7F
READY LD IX, # 3FE5

        JR TODOS
TRK_BF EQU # 8000


P.S. In the last issue was my little article on
free download beysika.Privedennaya there a procedure designed 
to read driver who, after his work in the HL shows the address 
byte located after the last loaded sector.


   If someone is using my prog,
Expect it.


             *



   Did you know that the work of the Player in STP
depends on the contents of the register A?

 Explained:

ORG +6 JP PLAY; entry point for PLAY.


       .......


PLAY DI

       LD (XXXX), SP

       LD D, 0 *

       EXX

       LD BC, XXXX

       LD HL, XXXX

       DEC (HL)

       JP NZ, XXXX

       LD (HL), 5; temp Mouzon.

       INC HL

       DEC (HL)

       JP P, XXXX

       LD HL, XXXX

       OR (HL); Testing (HL) to zero.

       JP Z, XXXX; Branching.

       .......


NOTE: XXXX designated nonessential
in this case values.

   As seen from the fragment
accumulator value is nowhere exposed. If the register A is not 
zero - checking OR (HL) or in zhist not work ...


   What this bug (?) Influences - is unknown, but the rumor 
seems to be no differences. 

   Nevertheless, we can fix it (why?)
PLAYER, replacing marked '*' command LD D, 0 into two: XOR A: 
LD D, A. 




Other articles:

Aperativchik - On the control of the shell DEJA VU

Aperativchik - Accuracy - the politeness of kings, the new issue of the journal.

Topic - Fun Top-98 or the obvious and incredible.

Topic - An Interview with Vladimir. Balchukeem before Fun Top-98.

Topic - Results Fun Top-98.

Topic - Photos from Fun Top-98.

drop of solder - ROM, which we vybiraem.Obzor ROM: Penatagon128, Scorpion ZS256, Spectrum128-branded version, Spectrum +2, Spectrum +2, Spectrum +3, ROM from PROFI CLUB.

drop of solder - Additional graphics mode 512x192.

SOFTWARE - New demoscene: FOREVER, ADRENALIZE, BOOM, TYRANY, BLAME, EMERGENCY, KATNARSIS.

SOFTWARE - New game programs: A LAST HERO of the LIGHT FORCE, MONSTR LAND, MIRROR.

CODING - Ultra-fast disk drives SPECCY.

CODING - Lessons from the encoder: Fractal paparatnik.

CODING - Driver read / write.

CODING - Lessons from the encoder: Generilka balls.

CODING - The algorithms of data compression.

CODING - On obechatke Listing of stack (5 rooms).

ANOTHER WORLD - WINDOWS-95 and beyond.

ANOTHER WORLD - News from the INTEL-a ...

ANOTHER WORLD - work PC and software

Hall of Fame - On spektrumskih journals.

Hall of Fame - letters to the editor.

Hall of Fame - On CD-ROM project from the city of Kemerovo.

Seven and 1 / 2 - Features a national ruleza 2 or ordered motion of electrons.

Seven and 1 / 2 - Guide for consumers of beer.

Seven and 1 / 2 - What if your computer does not work (Instructions for Hacker).

Seven and 1 / 2 - Guessing on cockroaches (Advice to a beginning hunter).

Seven and 1 / 2 - Instructions for use with a ballpoint pen.

attempt at writing - Poems Bazhenova: Candles, Confusion, Fall, Bezishodnost.

attempt at writing - Many Adventures of Winnie the Pooh (Part 3).

attempt at writing - Daily Hacker ordinary.

Advertising - Advertisements and announcements ...


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

Similar articles:
News - Black crow - a new electronic journals on the Spectrum.
Programming - BASIC Calculator (continued).

В этот день...   5 May