CHECK THE RESULTS RETURNED BY THE CONTROLLER
·
- -
-- -- --
--
------
-
----
- -
--- -- -
-
---
-
-- -- --- --- -- ----
-
-- -- ---- -- - --
;
DSTATE:
ESTABLI SH STATE UPON SUCCESSFUL OPERAT ION.
NEC TERM
-
TH I S ROUT I NE WA I TS FOR THE OPERAT I ON THEN ACCEPTS
THE STATUS FROM THE NEC FOR THE READ/WRITE/VERIFY/
FORMAT OPERAT I ON •
5-37
TEST FOR WR I TE_PROTECT
TEST MISS I NG ADDRESS MARK
TEST FOR RECORD NOT FOUND
CHECK FOR ERROR
I F ERROR JUMP
NO ERROR, MARK MED I A AS DETERM I NED
DR I VE DETERM I NED
?
IF DETERM I NED NO TRY TO DETERM I NE
LOAD STATE
KEEP ONLY RATE
RATE 250
?
NO MUST BE 1 .2M OR HI DATA RATE 80 TRK
TEST FOR DMA OVERRUN
SET ERROR COND I T I ON
RESTORE HEAD #,
# OF SECTORS
SA VE HEAD #,
# OF SECTOR S
WA I T FOR THE INTERRUPT
GET THE NEC STATUS
SET THE CORRECT DIRECT ION
POINT TO STATUS FIELD
GET STO
TEST FOR NORMAL TERM I NAT I ON
TEST FOR ABNORMAL TERMINATION
NOT ABNORMAL, BAD NEC
LOOK FOR ERROR
DTL PARAMETER FROM BLOCK
TO THE NEC
OUTPUT TO CONTROLLER
THROW AWAY ERROR EX I T
; TEST CONTROLLER I. D.
; GET STI
; TEST FOR EOT FOUND
; OUTPUT SECTOR #
BYTES / SECTOR PARAMETER FROM BLOCK
,
• TO THE NEC
; OUTPUT TO CONTROLLER
; EOT PARAMETER FROM BLOCK
;
• TO THE NEC
; OUTPUT TO CONTROLLER
;
GET GAP LENGTH
; OUTPUT HEAD #
1-15
01-10-86
DISKETTE (01/10/86)
AH,BAD_NEC
ttDSKETTE_STATUS, AH
ttDSKETTE_STATUS, 1
S I
SHORT SET END
ENDP
-
ttNEC STATUS
AL,I-
AH, RECORD NOT FND
J19
- -
AL,
I
AL,
I
AH,BAD CRC
JI9
-
AL,I
AH,BAD DMA
J19
-
AL,
I
AL,
I
AH ,RECORD NOT FND
J19
- -
AL,I
AH, WR I TE PROTECT
J19
-
AL,
I
AH ,BAD ADDR MARK
J19
-
-
S I ,OFFSET ttNEC STATUS
ttNEC STATUS
-
AL, 11000000B
SET END
AL, 01 OOOOOOB
J18
NEC OUTPUT
DL,6
GET PARM
NEC-OUTPUT
AX -
CS:BX
=
ADDRESS OF MEDIA/DRIVE PARAMETER TABLE
:
ttDSKETTE_STATUS, CY REFLECT STATUS OF OPERATION:
MOV
ABNORMAL TERM I NA T I ON, FIND OUT WHY
LODS
SAL
MOV
JC
SAL
SAL
MOV
JC
SAL
MOV
JC
SAL
SAL
MOV
JC
SAL
MOV
JC
SAL
MOV
JC
CLD
MOV
LODS
AND
JZ
CMP
JNZ
PUSH
S I
CALL
WAIT_INT
PUSHF
CALL
RESUL TS
JC
SET_END_POP
POPF
JC
SET_END
LET THE OPERATION HAPPEN
CALL
MOV
CALL
CALL
POP
;--- CHECK FOR HIGH DATA RATE 80 TRACK
j,8:
NEC MUST HAVE FAILED
J19:
SET_END: OR
CMP
CMC
POP
RET
SET END POP:
-
-POPF
JMP
NEe_TERM
; ON ENTRY:
; ON EXIT :
·
--- -- --------
- -
- --
--- -- ---
-
- -- --- -- ---- --- ---------- -
-
--- -- - --
--
DSTATE
PROC
NEAR
TEST
ttHF CNTRL, DUAL
JZ
SETBAC
CMP
ttDSKETTE STATUS, 0
JNZ
SETBAC-
OR
ttDSK_STATE[DI] ,MED_DET
TEST
ttDSK STATE[DI] ,DRV DET
JNZ
SETBAC
-
MOV
AL,ttDSK STATE[DI]
AND
AL ,RATE-MSK
CMP
AL,RATE-250
JNE
M _ ' 2 -
RET
RWV_COM ENDP
R15:
·
- ~~ _:~ ~ ~: - -
-
- --
~~:~:~~:::::~ ~~~: ~ - :~- ~:~:::~ _:~~~~:
-
~~- ~~:~~~~ ~~
--
NEC_ TERM
PROC
NEAR
~;~
-
~~~
-
~~~~
----
~~~~
-----
-
-----
-
----
-
---
-
----
-
------
-
----
-
-
--
-- --
-
MOV
AX ,OFFSET ER 2
; LOAD ERROR ADDRESS
PUSH
AX
-
; PUSH NEC OUT ERROR RETURN
MOV
AH, [BP+ I ]
; OUTPUT TRACK #
CALL
NEC OUTPUT
MOV
AX,SI
CALL
NEC OUTPUT
MOV
AH, TBP]
CALL
NEC OUTPUT
MOV
DL,3
CALL
GET PARM
CALL
NEC-OUTPUT
MOV
DL,4
CALL
GET PARM
CALL
NEC-OUTPUT
MOV
AH ,CS: [BX] .MD_GAP
1544
1545
1546
1547 06FI
1548 06Fl
B8 0726 R
1549 06F4 50
1550 06F5 8A 66 01
1551
06F8 E8 09FO R
1552 06FB 8B C6
1553 06FD E8 09FO R
1554 0700 8A 66 00
1555 0703 E8 09FO R
1556 0706 B2 03
1557 0708 E8 08FE R
1558 070B E8 09FO R
1559 070E B2 04
1560 0710 E8 08FE R
1561
0713 E8 09FO R
1562 0716 2E: 8A 67 05
1563 071 A
1564 071 A E8 09FO R
1565 071D B2 06
1566 071 F E8 08FE R
1567 0722 E8 09FO R
1568 0725 58
1569 0726
1570 0726 C3
1571
0727
1572
1573
1574
1575
1576
1577
1578
1579
1580 0727
1581
1582
1583
1584 0727 56
1585 0728 E8 OABA R
1586 072B 9C
1587 072C E8 OAE2 R
1588 072F 72 47
1589 0731
9D
1590 0732 72 3C
1591
1592
1593
1~94
0734 FC
1595 0735 BE 0042 R
1596 0738 AC
1597 0739 24 CO
1598 073B 74 33
1599 073D 3C 40
1600 073F 75 29
1601
1602
1603
1604 0741
AC
1605 0742 DO EO
1606 0744 B4 04
1607 0746 72 24
1608 0748 DO EO
1609 074A DO EO
16 10 07 4C B4 10
16 I
I
07 4E 72
I
C
1612 0750 DO EO
1613 0752 B4 08
1614 0754 72
16
1615 0756 DO EO
1616 0758 DO EO
1617 075A B4 04
1618 075C 72 OE
1619 075E DO EO
1620 0760 B4 03
1621
0762 72 08
1622 0764 DO EO
1623 0766 B4 02
1624 0768 72 02
1625
1626
1627 076A
1628 076A B4 20
1629 076C
1630 076C 08 26 0041 R
1631
0770
1632 0770 80 3E 0041 R 01
1633 0775 F5
1634 0776 5E
1635 0777 C3
1636
1637 0778
1638 0778 9D
1639 0779 EB F5
1640 077B
1641
1642
1643
1644 077B
1645 077B F6 06 008F R 01
1646 0780 74 3B
1647 0782 80 3E 0041 R 00
1648 0787 75 34
1649 0789 80 8D 0090 RIO
1650 078E F6 85 0090 R 04
1651
0793 75 28
1652 0795 8A 85 0090 R
1653 0799 24 CO
1654 079B 3C 80
1655 079D 75
19
1656
1657
IBM Personal Computer MACRO Assembler
Version 2.00
DSKETTE - -
01 /10/86
DISKETTE ADAPTER B I OS