IBM Personal Computer MACRO Assembler
Version 2.00
DSKETTE - -
01 / 10/86
0 I SKETTE ADAPTER B I OS
1- 10
01-10-86
TEST FOR SAVED DR I VE I NFORMAT I ON ALREADY SET
XlAT OLD
-
TRANSLATES 0 I SKETTE STATE LOCAT IONS FROM NEW
ARCH I TECTURE TO COMPATIBLE MODE.
; ON ENTRY:
CS:BX = MEDIA/DRIVE PARAMETER TABLE
; ON EXIT:
NONE
; REG I STERS ALTERED:
AX, CX, OX
TRY TO DETERM I NE
Al = 360 IN 360 UNESTABll SHED
TEST CONTROllER 1.0.
ACCESS STATE
TO BH FOR lATER
KEEP ONLY RATE
RATE 500 ?
YES 1.2/1.2 OR HIGH DATA RATE 80 TRK
Al = 360 I N 1.2 UNESTABl I SHED
RATE 300 ?
NO, 360/360 ,720/720
YES, DOUBLE STEP ?
YES, MUST BE 360
IN 1.2
• NONE OF THE ABOVE'
PROCESS COMPLETE
VALID DRIVE?
I F I NVALI 0 BACK
NO DRIVE?
I F NO DR I VE TRANSLATE DONE
VALI 0 DR I VE ?
IF INVALID BACK
NO DR IVE ?
I F NO DR I VE ATTEMPT DETERM I NE
CX = DR I VE NUMBER
Cl = SHIFT COUNT, A=O, B=4
CX = DR I VE NUMBER
Cl = SH I FT COUNT, A=O, B=4
LOAD MULTI DATA RATE BIT MASK
ROTATE BY MASK
MUlT I -OAT A RATE DETERM I NED ?
IF SO, NO NEED TO RE-SAVE
RETURN DR I VE TYPE IN (Al )
ERROR,
SET ' NONE OF THE ABOVE'
1 1.2MB DR I VE ?
1 NO, GO SET ' NONE OF THE ABOVE'
1 AL = 1.2 IN 1.2 UNESTABLISHED
lOAD ERROR ADDRESS
PUSH NEC OUT ERROR RETURN
SPEC I FY COMMAND
OUTPUT THE COMMAND
GET
I
ST SPEC I FY BYTE
OUTPUT THE COMMAND
GET SECOND SPEC I FY BYTE
1
OUTPUT THE COMMAND
1
POP ERROR RETURN
AL,M3D3U
AL,MED UNK
SHORT 'XL_SET
AH,ODSK STATE[DI]
BH,AH
-
AH,RATE MSK
AH,RATE-500
CHK HDR-80T
AL,M3DIU
AH,RATE 300
CHK 250-
BH,DBl STEP
TST_DE'f
01
: DR I VE
01
: DRIVE
CX,DI
Cl,
I
Cl,1
AH,FMT CAPA
AH,Cl -
OHF CNTRl, AH
SAVE_SET
CMOS TYPE
UNKNO
Al,02
UNKNO
AL,MIDI U
SHORT TST_DET
CALL
RET
RET
MOV
SHl
SHl
MOV
ROR
TEST
JNZ
ON ENTRY:
ON ENTRY:
MOV
JMP
ERASE DRIVE BITS IN OHF_CNTRL FOR THIS DRIVE
MOV
AH,DRV DET+FMT CAPA+TRK CAPA
1 MASK TO KEEP
ROR
AH,CL -
-
-I FI X MASK TO KEEP
NOT
AH
1
TRANSLATE MASK
AND
OHF_ CNTRl , AH
1 KEEP BITS FROM OTHER DR I VE I NT ACT
ACCESS CURRENT DR I VE BITS AND STORE IN OHF_CNTRl
MOV
AL,ODSK STATE[DI]
1
ACCESS STATE
AND
Al,DRV DET+FMT CAPA+TRK CAPA
1
KEEP DRIVE BITS
ROR
AL , Cl -
-
- 1 F I X FOR TH I S DR I VE
OR
OHF_CNTRL,Al
1
UPDATE SAVED DRIVE STATE
TRANSLATE TO COMPAT I Bill TY MODE
SAVE SET:
-
MOV
MOV
AND
CMP
JZ
MOV
CMP
JNZ
TEST
JNZ
~~~~
-
~~~
- - -
-
--
-
-;~~~
-
-
--
~~~~
- -
-- ---- --
-
--
-
-------
-
-
---
-- ---
-
---
--
-
TEST
OHF CNTRL,DUAl
TEST CONTROLLER 1.0.
JZ
XO OUT
CMP
01-;1
JA
XO OUT
CMP
ODSK_STATE[DI],O
JZ
XO_OUT
CHK HDR 80T:
-
-CALL
JC
CMP
JNE
MOV
JMP
CHK 250:
-
MOV
UNKNO:
.
--
-
- -
--
- -
--
- --
-
- -
- - -
-
--
---
-
- -
---
- -- - - - - -
-
-
--
- - -
-
-
--
- - --
--
- - - -
- --
:leLA T NEW
PROC
NEAR
-
TEST
OHF CNTRl,DUAl
JZ
XN OUT
CMP
01-;1
JA
XN OUT
CMP
ODSK_STATE[DI],O
JZ
DO DET
MOV
CX-;DI
SHl
Cl,1
SHL
Cl,
I
MOV
Al ,OHF CNTRl
1
DR I VE I NFORMAT I ON
ROR
AL,Cl -
1
TO LOW NIBBLE
AND
Al,DRV DET+FMT CAPA+TRK CAPA
1 KEEP DRIVE BITS
~~D
:g~~=~i~i~m:E~~T DRV_D~T~~~~'f~A6~7~~KS~~~~
.
-
--
-
----
-
- -
-
-
- - -
-
- - - ---- -
- -
- -
-
- - -- - -
-
- - - - - - -
-
- - - - - - - -
--
-
- -- - ----
SEND SPEC MD
PROC
NEAR
-
MOV
AX, OFFSET SPEC ESBAC
PUSH
AX
-
MOV
AH,03H
CALL
NEC OUTPUT
MOV
AH,CS: [BX] .MD SPEC I
CALL
NEC OUTPUT
-
MOV
AH,CS: [BX] .MD_SPEC2
CALL
NEC OUTPUT
POP
AX -
SPEC ESBAC:
-
RET
;:~~~:~::~~~---_:~~~---------------------------------------------
;
XlAT NEW
-
TRANSLATES 0 I SKETTE STATE lOCAT IONS FROM COMPAT I BlE
MODE TO NEW ARCH I TECTURE •
10 I 2
10 I 3
1014
10 I 5
101603EC
101 7 03EC B8 0403 R
1018 03EF 50
10 I 9 03FO B4 03
1020 03F2 E8 09FO R
1021 03F5 2E: 8A 27
1022 03F8 E8 09FO R
1023 03FB 2E: 8A 67 01
1024 03FF E8 09FO R
1025 0402 58
1026 0403
1027 0403 C3
1028 0404
1029
1030
103 I
1032
1033
1034
1035
1036 0404
1037 0404 F6 06 008F R 0 I
1038 0409 74 22
1039 040B 83 FF 0 I
1040 040E 77
10
1041 0410 80 BD 0090 R 00
1042041574 17
1043 041 7 8B CF
1044 0419 DO E I
1045 04
I
B DO E 1
1046 04 I 0 AO 008F R
1047 0420 02 C8
1048 0422 24 07
1049 0424 80 A5 0090 R F8
1050 0429 08 85 0090 R
105 I 0420
1052 0420 C3
1053
1054 042E
1055 042E E8 OB2B R
1056 0431 C3
1057
1058 0432
1059
1060
106 I
1062
1063
1064
1065
1066 0432
1067 0432 F6 06 008F R 01
1068 0437 74 79
1069 0439 83 FF 0 I
1070 043C 77 74
1071 043E 80 BD 0090 R 00
1072 0443 74 60
1073
1074
1075
1076 0445 8B CF
1077 0447 DO El
1078 0449 DO El
1079 044B B4 02
1080 0440 02 CC
108 I 044F 84 26 008F R
1082 0453 75
16
1083
1084
1085
1086 0455 B4 07
1087 0457 02 CC
1088 0459 F6 04
1089 045B 20 26 008F R
1090
1091
1092
1093 045F 8A 85 0090 R
1094 0463 24 07
1095 0465 02 C8
1096 0467 08 06 008F R
1097
1098
1099
1100 046B
1 101 046B 8A A5 0090 R
I 102 046F 8A FC
1103 0471
80 E4 CO
1104 0474 80 FC 00
11050477 7410
I
106 0479 BO 01
1107 047B 80 FC 40
1108 047E 75
16
I 109 0480 F6 C7 20
I
1 10 0483 75
10
1111
I
I 12 0485
1 1 13 0485 BO 07
1 I 14 0487 EB 20
1115
I I 16 0489
I
1
I
7 0489 E8 08CF R
1 I 18 048C 72 F7
1 1 19 048E 3C 02
I 120 0490 75 F3
1 121 0492 BO 02
L 122 0494 EB OC
1123
1124 0496
I 125 0496 BO 00
5-32
DISKETTE (01/10/86)