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.