free hit counter

IBM XT 5160 Technical Reference page 173

Hide thumbs Also See for XT 5160:
Table of Contents

Advertisement

IBM Personal Computer MACRO Assembler
Version 2.00
DSKETTE - -
01 /10/86
0 I SKETTE ADAPTER B I OS
1-4
01-10-86
0007
J7:
0007 E8 0301
R
CALL
SEND_SPEC
OODA
RESBAC:
OODA E8 0832 R
CALL
SETUP_END
VAR 10US CLEANUPS
0000 8B DE
MOV
BX,SI
GET SAVED AL TO BL
OODF 8A C3
MOV
AL,BL
PUT BACK FOR RETURN
OOEI C3
RET
00E2
DR_POP_ERR:
00E2 59
POP
CX
CLEAR STACK
00E3
DR_ERR:
00E3 80 OE 0041 R 20
OR
ODSKETTE_STATUS ,BAD_NEC
SET ERROR CODE
00E8 EB FO
JMP
SHORT RESBAC
RETURN FROM RESET
OOEA
01 SK_RESET
ENDP
DISK STATUS
;
-
DISKETTE STATUS.
; ON ENTRY:
AH = STATUS OF PREV 10US OPERATION
S I -H I
: HEAD #
S I-LOW :
# OF SECTORS OR DASD TYPE FOR FORMAT
ES
: BUFFER SEGMENT
[BP)
:
SECTOR #
[BP+ I)
: TRACK #
[BP+2)
: BUFFER OFFSET
ACROSS CALLS TO SUBROUT I NES THE CARRY FLAG (CY= I), WHERE I NO I CATED IN
SUBROUT I NE PROLOGUES, REPRESENTS AN EXCEPT I ON RETURN
(NORMALLY AN ERROR
COND I T I ON).
I N MOST CASES, WHEN CY = 1, ODSKETTE STATUS CONTA I NS THE
SPEC I F I C ERROR CODE.
-
TURN ON I NTERRUPT ENABLE
RESET THE ADAPTER
SET RECALl BRATE REQU I RED ON ALL DR I VES
WAIT FOR I/O
TURN OFF RESET BIT
RESET THE ADAPTER
ENABLE THE INTERRUPTS
WA I T FOR THE INTERRUPT
I F ERROR, RETURN IT
CL = EXPECTED ONEC_STATUS
(AH)
= ODSKETTE STATUS
CALL THE REQUESTED FUNCT I ON
RESTORE ALL REG I STERS
SAVE FOR CALL
';OAD NEC_OUTPUT ERROR ADDRESS
SENSE I NTERRUPT STATUS COMMAND
THROW AWAY ERROR RETURN
READ I N THE RESULTS
RESTORE AFTER CALL
ERROR RETURN
TEST FOR DR I VE READY TRANS I T I ON
EVERYTHING OK
NEXT EXPECTED ONEC STATUS
ALL POSS I BLE DR I VES CLEARED
FALL THRU IF 11 000 1OOB OR
>
;
THROW AWAY SAVED FLAGS
WAIT INT
DR ERR
CX-; I 1000000B
WORD PTR CS: [BX)
SI
OS
CX
BX
OX
01
BP
2
CX
AX, OFFSET DR POP ERR
AX
- -
AH,08H
NEC OUTPUT
AX -
RESULTS
CX
DR ERR
CL-;ONEC STATUS
DR ERR -
CL-
CL,llOOOOllB
NXT_DRV
CALL
POP
POP
POP
POP
POP
POP
POP
RET
SEND SPEC I FY COMMAND TO NEC
NXT DRV:
-
PUSH
MOV
PUSH
MOV
CALL
POP
CALL
POP
JC
CMP
JNZ
INC
CMP
JBE
~~~
-
~ ~~ -~;
- - -
-
- -
~ ~;~
-
~~;~~
-
-
-
- -
-- ---
-
-
--
-
-
~~
-:
-
~~;-~~;~~
-
-
--- ---
-
OW
0 I SK-STATUS
AH = 01; STATUS
OW
0 I SK-READ
AH = 02; READ
OW
0 I SK-WR I TE
AH = 03; WR I TE
OW
0 I SK-VERF
AH = 04; VER I FY
OW
0 I SK-FORMAT
AH = 05; FORMAT
OW
FNC ERR
AH = 06;
I NVALI 0
OW
FNC-ERR
AH = 07;
INVALID
OW
0 I SK PARMS
AH = 08; READ DR I VE PARAMETERS
OW
FNC ERR
AH = 09;
I NVALI 0
OW
FNC-ERR
AH = OA;
INVALID
OW
FNC-ERR
AH = OB;
I NVALI 0
OW
FNC-ERR
AH = OC;
I NVAL I 0
OW
FNC-ERR
AH = 00;
INVALID
OW
FNC-ERR
AH '= OE;
INVALID
OW
FNC-ERR
AH = OF;
INVALID
OW
FNC-ERR
AH = 10;
INVALID
OW
FNC-ERR
AH = 11;
INVALID
OW
FNC-ERR
AH = 12;
I NVALI 0
OW
FNC-ERR
AH = 13;
I NVALI 0
OW
FNC-ERR
AH = 14;
INVALID
OW
0 I SK TYPE
AH = 15; READ DASD TYPE
OW
0 I SK-CHANGE
AH = 16; CHANGE STATUS
OW
FORMAT SET
AH = 17; SET DASD TYPE
OW
SET MEDI A
AH = 18; SET MED I A TYPE
FNC TAE EQU
S
-
END
DISKETTE 10 1
ENDP
:
-~~;~-~~;~~----------------------------------------------------~
;
-
RESET THE 0 I SKETTE SYSTEM.
:
; ON EXIT:
ODSKETTE_STATUS, CY REFLECT STATUS OF OPERATION:
~ ~;~
-
~~;~~
-
- -
---
~~~~
--
-
-
~~~~
---
-
-- ---
-
--- -- --- -----
-
------- -- - ---
-
MOV
OX, 03F2H
ADAPTER CONTROL PORT
CLI
NO INTERRUPTS
MOV
AL ,OMOTOR ST ATUS
GET 0 I G I TAL OUTPUT REG I STER REFLECTI ON
AND
AL,001111T1B
KEEP SELECTED AND MOTOR ON BITS
ROL
AL, 1
MOTOR VALUE TO HIGH NIBBLE
ROL
AL, 1
DR I VE SELECT TO LOW NIBBLE
ROL
AL,1
ROL
AL, I
OR
AL, 0000 1OOOB
OUT
DX,AL
MOV
OSEEK STATUS, 0
JMP
S+2-
OR
AL, 00000 1OOB
OUT
DX,AL
STI
CALL
JC
MOV
329
330
331
332
333
334
335
336
337
338
339
340
341
0053 2E: FF 17
342
343
0056 5E
344
0057
IF
345
0058 59
346
0059 5B
347
005A 5A
348
005B 5F
349
005C 50
350
0050 CA 0002
351
352
353
0060 0092 R
354
0062 OOEA R
355
0064 00F6 R
356
0066 0102 R
357
0068 OIOE R
358
006A 0 I I A R
359
006C 0170 R
360
006E 0170 R
361
0070 0187 R
362
0072 0170 R
363
0074 0170 R
364
0076 0 I 70 R
365
0078 0170 R
366
007A 0170 R
367
007C 0170 R
368
007E 0170 R
369
0080 0170 R
370
0082 0170 R
371
0084 0170 R
372
0086 0170 R
373
0088 0170 R
374
008A 027C R
375
008C 02BO R
376
008E 02E5 R
377
0090 0340 R
378
= 0092
379
0092
380
381
382
383
384
385
386
0092
387
0092 BA 03F2
388
0095 FA
389
0096 AO 003F R
390
0099 24 3F
391
009B DO CO
392
0090 DO CO
393
009F DO CO
394
OOA 1 DO CO
395
00A3 OC 08
396
00A5 EE
397
00A6 C6 06 003E R 00
398
OOAB EB 00
399
OOAD OC 04
400
OOAF EE
40 I
OOBO FB
402
OOB I E8 OABA R
403
00B4 72 20
404
00B6 B9 OOCO
405
406
00B9
407
00B9 51
408
OOBA B8 00E2 R
409
OOBD 50
410
OOBE B4 08
411
OOCO E8 09FO R
412
00C3 58
413
00C4 E8 OAE2 R
414
00C7 59
415
00C8 72
19
416
OOCA 3A OE 0042 R
417
OOCE 75
13
418
0000 FE C 1
419
0002 80 F9 C3
420
0005 76 E2
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
5-26
DISKETTE (01/10/86)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents