AH
=
0
CY
=
0
ES
=
SEGMENT OF MEDIA/DRIVE PARAMETER TABLE
DI/[BP+6]
=
OFFSET OF MEDIA/DRIVE PARAMETER TABLE
IF ERROR:
AH
=
ODSKETTE STATUS
CY
=
1
-
;
------
--
-
-
-- ----
- -
-
- ----
-- --
- - - --- - - - -
--
---------
-
- - - -
-
---- -----
DR TYPE CHECK
-
CHECK IF THE GIVEN DRIVE TYPE IN REGISTER
(ALI
I S SUPPORTED IN B I OS DR I VE TYPE TABLE
ON ENTRY:
;
AL
=
DR I VE TYPE
ON EXIT:
;
CS
=
SEGMENT OF MEDIA/DRIVE PARAMETER TABLE (CODE)
CY
=
0
DR I VE TYPE SUPPORTED
;
BX
=
OFFSET TO MEDIA/DRIVE PARAMETER TABLE
CY
=
1
DR I VE TYPE NOT SUPPORTED
REG I STERS ALTERED:
BX
.
-
-------
- ------- - -
-
---------
------
- - -
----
-
-
-
-
- -- ----- --- - -------
SEND SPEC
;
-
SEND THE SPEC I FY COMMAND TO CONTROLLER US I NG DATA FROM
THE DRIVE PARAMETER TABLE POINTED BY ODISK POINTER
; ON ENTRY:
ODISK POINTER
=
DRIVE PARAMETER TABLE
ON EXIT:
NONE -
REG I STERS ALTERED: AX
~~~~-~~~~-------~~~~----~~~~-------------------------------------
-
MOV
AX, OFFSET SPECBAC
; LOAD ERROR ADDRESS
PUSH
AX
; PUSH NEC OUT ERROR RETURN
MOV
AH, 03H
;
SPEC I FY COMMAND
CALL
NEC OUTPUT
; OUTPUT THE COMMAND
SUB
DL, DL
; FIRST SPEC I FY BYTE
CALL
GET PARM
; GET PARAMETER TO AH
CALL
NEC-OUTPUT
; OUTPUT THE COMMAND
MOV
DL ,
T
;
SECOND SPEC I FY BYTE
CALL
GET PARM
; GET
~ARAMETER
TO AH
CALL
NEC-OUTPUT
; OUTPUT THE COMMAND
POP
AX -
; POP ERROR RETURN
SPECBAC:
RET
SEND_SPEC
ENDP
5-31
; BX
=
MEDIA TABLE
; ERROR, MED I A TYPE NOT FOUND
; DI
=
MEDIA/DRIVE PARAMETER TAB
GET DR I VE TYPE
DR I VE TYPE MATCH ?
YES, RETURN WITH CARRY RESET
CHECK NEXT DR I VE TYPE
TRANSLATE STATE TO COMPATIBLE MODE
VAR 10US CLEANUPS
PO I NT TO TABLE ENTRY 4
PO I NT TO TABLE ENTRY 3
SECTORS/TRACK
=
15 ?
POINT TO TABLE ENTRY 6
SECTORS/TRACK
=
18 ?
; DR I VE TYPE NOT FOUND IN TABLE
; BX
=
I NDEX TO DR TYPE TABLE
; CX
=
LOOP COUNT -
; GET SECTOR / TRACK
; GET MAX. TRACK ,
; MATCH ?
; NOT SUPPORTED
; GET RATE
; DOUBLE STEP REQUIRED FOR RATE 300
; TRANSLATE STATE TO PRESENT ARCH.
;
ZERO I NDEX PO INTER
; MAX. TRACK
=
40 ?
1-9
01-10-86
SHORT TYPE_RTN
CX
AX
BX,CS:WORD PTR DR_l'YPE[BX+I]
XLAT OLD
SETUP_END
AH,CS:DR TYPE[BX]
AL,AH
-
DR TYPE VALID
BX:3
-
TYPE_CHK
ODSKETTE STATUS,MED NOT FND
SM RTN
-
- -
ENDP
BX, CS: WORD PTR DR_TYPE [BX+ I]
BL,6
BYTE PTR [BP], 15
MD FND
BL:,8
BYTE PTR [BP], 18
MD FND
BL:12
~~:g~: I~~I :~g-~~~-i~~
[BP] ,AX
- -
ER RTN
AL:CS: [BX] .MD RATE
AL,RATE 300
-
MD SET -
AL:DBL_STEP
[BP+6] ,BX
;
SAVE TABLE POINTER IN STACK
AL, MED DET
;
SET MES I A ESTABL I SHED
:g~~-~i~i~lg:
I
:~~T MED_D~T;~~LSi~~~+RATE_MSK
; CLEAR STATE
AX,CS
;
SEGMENT MEDIA/DRIVE PARAMETER TABLE
ES, AX
; ES
I S SEGMENT OF TABLE
DISKETTE (01/10/86)
SEND SPEC MD
-
SEND THE SPEC I FY COMMAND TO CONTROLLER US I NG DATA FROM
THE MEDIA/DRIVE PARAMETER TABLE POINTED BY
(CSsBXI
~~
-
~;~~
-
~~~~~
---
~~~~
----
~~~~
-
-
-
----
-
-------
------------
-
-
------
--
-
-PUSH
AX
PUSH
CX
XOR
BX,BX
MOV
CX,DR_CNT
TYPE CHK:
-
MOV
CMP
.JE
ADD
LOOP
STC
.JMP
DR TYPE VALl D:
-
-MOV
TYPE RTN:
-
POP
POP
RET
DR_TYPE_CHECK
ENDP
MD_FND:
MOV
MOV
MOV
CMP
.JNE
MOV
CMP
.JNE
OR
MD
-
SET:
MOV
OR
AND
OR
MOV
MOV
SM_RTN:
CALL
CALL
RET
ER_RTN:
MOV
.JMP
SET_MEDIA
.
- -
-------
-
--
-----
--
- ---- -----
-
----
-
--
-----
-
- ---- - - - - ---
----- ----
SET
MED I A
PROC
NEAR
-
CALL
XLAT NEW
XOR
BX,BX
CMP
BYTE PTR [BP+ 1),39
.JNE
TBL CHK 1
TEST
ODSK STATE[DI],TRK CAPA
80 TRACK DRIVE?
.JZ
MD FiiiD
-
PO I NT TO TABLE ENTRY I
MOV
BL:3
POINT TO TABLE ENTRY 2
.JMP
SHORT MD_FND
TBL CHK 1:
-
MOV
CMP
.JE
MOV
CMP
.JE
MOV
899
900
901
902
903
904
905
906
907
034D
908
034D E8 0404 R
909
0350 33 DB
910
0352 80 7E 01
27
911
0356 75 OB
912
0358 F6 85 0090 R 01
913
035D 74 16
914
035F B3 03
915
0361 EB 12
916
0363
917
0363 B3 06
918
0365 80 7E 00 OF
919
0369 74 OA
920
036B B3
12
921
036D 80 7E 00
12
922
0371
74 02
923
0373 B3 OC
924
0375
925
0375 2E: 8B 9F 0001
R
LE
926
037A 2E: 8A 47 04
927
037E 2E: 8A 67 OB
928
0382 39 46 00
929
0385 75 23
930
0387 2E: 8A 47 OC
931
038B 3C 40
932
038D 75 02
933
038F OC 20
934
0391
935
0391
89 5E 06
936
0394 OC
10
937
0396 80 A5 0090 R OF
938
039B 08 85 0090 R
939
039F 8C C8
940
03A 1 8E CO
941
03A3
942
03A3 E8 0432 R
943
03A6 E8 0832 R
944
03A9 C3
945
03AA
946
03AA C6 06 0041 R OC
947
03AF EB F2
948
03B1
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
03B 1
964
03B 1 50
965
03B2 51
966
03B3 33 DB
967
03B5 B9 0006
968
03B8
969
03B8 2E: 8A A 7 0000 R
970
03BD 3A C4
971
03BF 74 08
972
03C 1 83 C3 03
973
03C4 E2 F2
974
03C6 F9
975
03C7 EB 05
976
03C9
977
03C9 2E: 8B 9F 0001
R
978
03CE
979
03CE 59
980
03CF 58
981
03DO C3
982
03D 1
983
984
985
986
987
988
989
990
991
992
03D 1
993
03D 1 B8 03EB R
994
03D4 50
995
03D5 B4 03
996
03D7 E8 09FO R
997
03DA 2A D2
998
03DC E8 08FE R
999
03DF E8 09FO R
1000 03E2 B2 01
1001 03E4 E8 08FE R
1002 03E7 E8 09FO R
1003 03EA 58
1004 03EB
1005 03EB C3
1006 03EC
1007
1008
1009
1010
1011
IBM Personal Computer MACRO Assembler
Version 2.00
DSKETTE -- 01 /10/86
DISKETTE ADAPTER B I OS