IBM Personal Computer MACRO Assembler
Version 2.00
DSKETTE - -
01 /10/86
0 I SKETTE ADAPTER 810S
1-12
01-10-86
TH I S SEQUENCE ENSURES WHENEVER A 0 I SKETTE I S CHANGED THAT
MED CHANGE
-
CHECKS FOR MEDIA CHANGE, RESETS MEDIA CHANGE,
CHECK S MED I A CHANGE AGA IN.
I F ERROR DO NOT SEND MORE COMMANDS
OP CODE COMMON TO READ / WR I TE / VER I FY
I F ERROR DO NOT SEND MORE COMMANDS
TERM I NATE, GET STATUS, ETC.
ESTA8L1 SH STATE I F SUCCESSFUL
AL
=
NUM8ER TRANSFERRED
8AD DMA ERROR ENTRY
SAVE NUM8ER TRANSFERRED
TRANSLATE STATE TO COMPATI8LE MODE
RESTORE NUM8ER TRANSFERRED
VARIOUS CLEANUPS
CHECK FOR,
SETUP RETR Y
RESTORE READ / WR I TE / VER I FY PARAMETER
CY
=
0 NO RETRY
CY
=
1 MEANS RETRY
MED I A DETERM I NED ?
NO STATES IF DETERMINED
AH
=
START RATE,
AL
=
END RATE
DRIVE?
DO NOT KNOW DR I VE
SET UP FOR 1.2 M END RATE
1.2 M
?
JUMP WITH F I XED END RATE
START
&
END RATE
=
250 FOR 360 DR I VE
CLEAR STATE
SAVE
IT
1.2 M DRI VE
JUMP IF NOT
SET FORMAT RATE
SKIP OTHER STATE PROCESSING
CHECK FOR TYPE 3
JUMP IF NOT
I S DR I VE DETERM I NED
TREAT AS NON 1.2 DRIVE
IS 1.2M
JUMP IF NOT
RATE 300
CONTINUE
CHECK FOR TYPE 4
I
NO DRIVE, CMOS 8AD
I
MUST 8E RATE 250
I
STORE AWAY
AL
N 12
AH,MED DET+RATE 500
SHORT SKP_STATE-
AL
N 720
AH,DRV DET
ISNT 12
AH,FMT CAPA
ISNT 12
AH,MED DET+RATE 300
SHORT SKP_STATE-
AL
CL DRV
SHORT FI_RATE
AH,MED_DET+RATE_250
(IIDSK_STATE[DI) ,AH
AH,AH
SHORT SKP STATE
ENDP
-
AX
XLAT OLD
AX
-
SETUP_END
ENDP
(IIDSK_STATE[DI) ,NOT RATE_MSK+D8L_STEP I TURN OFF THE RATE
(IIDSK_STATE[DI),AH
I
RATE FIRST TO TRY
(IILASTRATE, NOT STRT MSK
I
ERASE LAST TO TRY RATE 81 TS
AL,I
-
TO OPERATION LAST RATE LOCATION
AL,
I
AL,I
AL,I
(IILASTRATE, AL
LAST RATE
CHK RET
RWV-COM
CHK-RET
NEC:TERM
DSTATE
NUM_TRANS
RETRY
AX
RWV END
DO_AGAIN
RET
AND
OR
AND
ROR
ROR
ROR
ROR
OR
ON EX IT:
.
----------------------------------------------------------------
;
SETUP STATE:
INITIALIZES START AND END RATES.
~~~~~
-
~~~~~
-
-
--
-
~~~~
---
-
~~~~
-
- -
---
-
- - -
--------
-
-------
- -
------- --
-
TEST
(IIHF CNTRL,DUAL
TEST CONTROLLER 1.0.
JZ
J1C-
TEST
(IIDSK_STATE[DI) ,MED_DET
JNZ
JI C
MOV
AX ,RATE 300·H+RATE 250
TEST
(IIDSK_STATE[DI) ,DRV:DET
JZ
AX SET
MOV
AL-;RATE 500
TEST
(IIDSK_STATE[DI) ,FMT_CAPA
JNZ
AX SET
MOV
AX-;RATE_250·X
DEC
JNZ
TEST
JZ
TEST
JZ
OR
JMP
DEC
JNZ
JMP
ISNT 12:
-
OR
SKP STATE:
-
MOV
CY
=
I MEANS MED I A CHANGE OR TIMEOUT
(IIDSKETTE_STATUS
=
ERROR CODE
~~~
-
~~~~~~
--
-
--
-
~~~~
---
-~~~~
------- -
-
--- - ----
-
- --
-
--- - --
--- --
-- --
-
TEST
(IIHF CNTRL,DUAL
I TEST CONTROLLER 1.0.
JZ
OK2-
CALL
READ DSKCHNG
I READ 0 I SK CHANGE LINE STATE
JZ
MC OUT
I 8YPASS HANDL I NG 0 I SK CHANGE LINE
AND
(IIDSK_STATE[DI) ,NOT MED_DET
I CLEAR STATE FOR THIS DRIVE
JC
CALL
JC
CALL
JIC:
RET
SETUP_STATE
ENDP
;
-
-
~~~
-
~ ~ ~ ~; - ~~~~~~ ~ ~~ -~~~~~
-
~ ~ - ~~~~~ ~~~~~~~~
-
~~
-
~~~~~~- ~ ~ ~~ ~
-- --
~~~ -~ ~~~
-
---
-
- --
~~~~
-
-
-
-~~~~
- --
-
--- -
- -
-
-
-------- ------
-
--- --
-
-- --
-
TEST
(IIHF CNTRL, DUAL
TEST CONTROLLER 1.0.
JZ
FlOUT
TEST
(IIDSK_STATE[DI),MED_DET
IS MEDIA ESTA8L1SHED
JNZ
F lOUT
I F SO RETURN
CALL
CMOS TYPE
RETURN DR I VE TYPE IN AL
JC
CL DRV
ERROR I N CMOS ASSUME NO DR I VE
DEC
AL-
MAKE ZERO OR I GIN
JS
CL DRV
NO DR I VE IF AL 0
MOV
AH-;(IIDSK STATE[DI)
I
AH
=
CURRENT STATE
AND
AH,NOT MED DET+D8L STEP+RATE MSK
I CLEAR
OR
AL, AL
-
-
I CHECK FOR 360
JNZ
N 360
I
IF 360 WILL 8E 0
OR
AH,MED DET+RATE 250
I ESTA8L1SH MEDIA
JMP
SHORT SKP_STATE-
I
SKIP OTHER STATE PROCESSING
RWV 8AC:
-
PUSH
CALL
POP
CALL
RET
RD_WR_ VF
DEC
JNZ
FI RATE:OR
-
JMP
CHK RET:
-
CALL
POP
JNC
JMP
RWV END:
-
CALL
CALL
1239 053F 72 08
1240 0541 E8 06F 1 R
1241
0544 72 03
1242 0546 E8 0727 R
1243
1244 0549
1245 0549 E8 078E R
1246 054C 58
1247 0540 73 03
1248 054F E9 0488 R
1249
1250 0552
1251
0552 E8 0778 R
1252 0555 E8 0805 R
1253
1254 0558
1255 0558 50
1256 0559 E8 0432 R
1257 055C 58
1258 0550 E8 0832 R
1259 0560 C3
1260 0561
1261
1262
1263
1264 0561
1265 0561 F6 06 008F R 0 I
1266 0566 74 37
1267 0568 F6 85 0090 RIO
1268 0560 75 30
1269 056F 88 4080
1270 0572 F6 85 0090 R 04
1271
0577 74 OC
1272 0579 80 00
1273 0578 F6 85 0090 R 02
1274 0580 75 03
1275 0582 88 8080
1276
1277 0585
1278 0585 80 A5 0090 R IF
1279 058A 08 A5 0090 R
1280 058E 80 26 0088 R F3
1281
0593 DO C8
1282 0595 DO C8
1283 0597 DO C8
1284 0599 DO C8
1285 0598 08 06 0088 R
1286 059F
1287 059F C3
1288 05AO
1289
1290
1291
1292 05AO
1293 05AO F6 06 008F R 01
1294 05A5 74 49
1295 05A7 F6 85 0090 R 10
1296 05AC 75 42
1297 05AE E8 08CF R
1298 0581
72 3E
1299 0583 FE C8
1300 0585 78 3A
130 I 0587 8A A5 0090 R
1302 0588 80 E4 OF
1303 058E OA CO
1304 05CO 75 05
1305 05C2 80 CC 90
1306 05C5 E8 25
1307
1308 05C7
1309 05C7 FE C8
1310 05C9 75 05
131 I 05C8 80 CC
10
13 12 05CE E8 I C
1313
1314 0500
1315 0500 FE C8
1316 0502 75 OF
1317 0504 F6 C4 04
1318 0507 74 10
1319 0509 F6 C4 02
1320 05DC 74 08
1321 05DE 80 CC 50
1322 05E 1 E8 09
1323 05E3
1324 05E3 FE C8
1325 05E5 75 OA
1326 05E7 E8 E2
1327 05E9
1328 05E9 80 CC 90
1329 05EC
1330 05EC 88 A5 0090 R
1331
05FO
1332 05FO C3
I
~33
05F I
1334 05Fl
32 E4
1335 05F3 E8 F7
1336 05F5
1337
1338
1339
1340
1341
1342
1343
1344
1345 05F5
1346 05F5 F6 06 008F R 01
1347 05FA 74 37
1348 05FC E8 0821
R
1349 05FF 74 34
1350 0601
80 A5 0090 R EF
1351
1352
5-34
DISKETTE (01/10/86)