Impulse #02
31 декабря 1997

Programmers - Correct handling of disk errors that occur when accessing the TR-DOS by # 3D13.

<b>Programmers</b> - Correct handling of disk errors that occur when accessing the TR-DOS by # 3D13.
   The following subroutine, which I discuss in this stateeto 
correct processing of disk errors. 


   This procedure is quite
simple and specific comments are not
requires. Access it should
as well as to # 3D13, the only thing here to say - it
that it changes the values ​​of
system variables # 5C3D / # 5C3E
(23613/23614) 23746 (# 5CC2), the vector interrupt I, register 
IY, and sets the interrupt mode

IM 1, so that if necessary
You can before calling the procedure, these values ​​are stored 
and restore them on exit.



   Unlike the procedure of
# 3D13 lies in the fact that
leaving it in the event
errors in akkamulyator will be recorded unit (usually for
Reading it is a mistake DISK ERROR, and
for recording READ ONLY), if the
disk accesses is successful in akkamulyatore is 0.


   If the drive will not
floppy disk is inserted, no
Output from the procedure will not happen until the drive will 
not wait at least some disk.



   And now can see
with the procedure described above:


DISK DI

        LD (RHL +1), HL

        LD (RDE +1), DE

        LD (RBC +1), BC

        LD (RGA +1), A

        IM 1

        LD A, # 3F

        LD I, A

        LD (ZABA +1), SP
MOLOKO LD HL, ZABA

        PUSH HL

        LD (23613), SP

        LD A, 195

        LD HL, REAL_SF

        LD (23746), A

        LD (23747), HL

        LD HL, 0

        LD (23823), HL

        LD IY, 23610

        LD (IY +0), 255
RHL LD HL, 0
RDE LD DE, 0
RBC LD BC, 0
RGA LD A, 0

        CALL # 3D13

        XOR A
LER2 DI

        LD SP, (ZABA +1)

        RET
ZABA LD SP, 0

        JR MOLOKO
REAL_SF EX (SP), HL

        PUSH HL

        PUSH DE

        PUSH AF

        EX DE, HL

        OR A

        LD HL, 3435

        SBC HL, DE

        JR Z, E1

        OR A

        LD HL, 8020

        SBC HL, DE

        JR Z, E2

        POP AF

        POP DE

        POP HL

        EX (SP), HL

        RET
E1 LD A, 1

        JR LER2
E2 POP AF

        POP DE

        POP HL

        EX (SP), HL

        INC SP

        INC SP

        SCF

        RET


             *


  P.S. Here such here, the case.





Other articles:

Entry - The new wrapper for the newspaper.

Charts BBS - Graphs of BBS.

Bottle rosin - The controller for BZ128 Computer "Byte".

Programmers - Quick procedure drawing a circle.

Programmers - Fast Decruncher to packer Data-Squeezer v4.x.

Programmers - Correct handling of disk errors that occur when accessing the TR-DOS by # 3D13.

Story - Novella to play "Pulp abbtstvo" (La abadia).

AMIGA4EVER - On the Amiga scene.

Story - The story "The New Adventures of Winnie the Pooh" (Chapter 3.4).

Advertising - Advertising and announcements.

Conclusion - Conclusion.


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

Similar articles:
From the Editor - Happy New Year!
Demo-Building - Generator table of squares.
Interface - Topic is devoted to letters from readers. Food for Thought on Life SPECCY.

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