free hit counter

IBM XT 5160 Technical Reference page 175

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 BIOS
1 -6
01-10-86
;--- DATA RATE IS 250 KBS, TRY 360 KB TABLE FIRST
FNC ERR
-
I NV ALI 0 FUNCTI ON REQUES TED OR I NVALI 0 DR I VE ;
SET BAD COMMAND I N STATUS.
NOTE :
THE ABOVE I NFORMAT I ON I S STORED I N THE USERS STACK AT
THE LOCAT IONS WHERE THE MA I N ROUT I NE WILL POP THEM
I NTO THE APPROPR I ATE REG I STERS BEFORE RETURN I NG TO THE
CALLER.
DRIVE TYPE 4
RTN CS:BX
=
MEDIA/DRIVE PARAM TBL
GET SECTOR / TRACK
DR I VE TYPE I
(360KB)
RTN CS:BX
=
MEDIA/DRIVE PARAM TBL
GET SECTOR / TRACK
GET MAX. TRACK NUMBER
80 TRACK?
MUST BE 360KB DR I VE
I SOLATE STATE
RATE 250 ?
NO, GO CHECK OTHER RATE
LOAD STATE FOR TH I S DR I VE
CHECK FOR ESTABL I SHED STATE
CMOS BAD /1 NVALI 0 AND UNEST ABL I SHED
RESTORE AL WITH CALLERS VALUE
SET BAD COMMAND ERROR IN
( AH )
SET ERROR RETURN CODE
TRANSLATE STATE TO PRESENT ARCH.
DR I VE TYPE
=
0
LOAD EQU I PMENT FLAG FOR # 0 I SKETTES
KEEP 0 I SKETTE DR I VE BI TS
ARE THERE ANY DR I VES INSTALLED?
NC-->NO DR I VES,
ZERO PARAMETERS
ROTATE TO ORIGINAL POSITION
ROTATE BITS 6 AND 1 TO 0 AND 1
CONVERT TO RELATI VE 1
STORE NUMBER OF DR I VES
CHECK CONTROLLER 1.0.
CONT I NUE WITH USUAL PARMS CHECK
RETURN TH I S CONTROLLERS PARMS
CHECK FOR VALID DRIVE
DR I VE I NV ALI 0
MAX I MUM HEAD NUMBER
=
I
RETURN DR I VE TYPE IN AL
ON CMOS BAD CHECK ESTABL I SHED
TEST FOR NO DR I VE TYPE
..JUMP IF SO
RTN CS: BX
=
MED I A/DR I VE PARAM TBL
TYPE NOT I N TABLE
(POSS I BLE BAD CMOS)
STORE VALl 0 CMOS DR I VE TYPE
GET SECTOR / TRACK
GET MAX. TRACK NUMBER
CMOS GOOD, USE CMOS
THROW AWAY ERROR
TERMINATE, RECEIVE STATUS, ETC.
TRANSLATE STATE TO COMPATIBLE MODE
VAR 10US CLEANUPS
GET SAVED AL TO BL
PUT BACK FOR RETURN
AL,04
DR TYPE CHECK
CL-;CS: [ex] .MD_SEC_TRK
AL,Ol
DR TYPE CHECK
CL-;CS: [eX] .MD SEC TRK
CH,CS: [BX] .MD-MAX=:TRK
tlDSK STATE[DIT, TRK CAPA
STO_CX
-
01,
I
NON DRV 1
BYTE PTR[BP+5],
I
CMOS TYPE
CHK EST
AL,AL
CHK EST
DR TYPE CHECK
CHi< EST-
[BP+2],AL
g~:g~: l~~J :~g=:~~~=:i~~
SHORT STO_CX
AH,RATE MSK
AH, RATE-250
USE_EST2
AH,tlDSK STATE[DI]
AH,MED DET
NON_DR'll
AX,SI
AH,BAD_CMD
XL AT NEW
WORD-PTR [BP+2],0
AX, tlEQU I P FLAG
AL,I 1000001B
AL,I
NON DRV
AL,T
AL,
I
AL,
I
AL
[BP+4] ,AL
tlHF CNTRL, DUAL
DPI-CONT
DET=:PARMS
ENDP
GET PARM
NEC-OUTPUT
AX -
NEC_TERM
XLAT OLD
SETUP END
BX,SI-
AL,BL
MOV
CALL
MOV
MOV
TEST
..JZ
CALL
CALL
POP
CALL
IT IS HIGH DATA RATE/80 TRACK DRIVE
PARM HDR 80T:
-
MOV
CALL
MOV
MOV
MOV
STC
RET
CHK EST:
-
MOV
TEST
..JZ
USE EST:
-
AND
CMP
..JNE
DISK P2:
-
CALL
MOV
MOV
AND
SHR
..JNC
ROL
ROL
ROL
INC
MOV
TEST
..JNZ
..JMP
DPI
CONT:
-
CMP
..JA
MOV
CALL
..JC
OR
..JZ
CALL
..JC
MOV
MOV
MOV
..JMP
.
----------------------------------------------------------------
DISK PARMS
PROC
NEAR
-
CMP
0 I ,80H
; CHECK FOR F I XED MED
I A TYPE REQUEST
..JB
0 I SK_P2
; CONTI NUE I F NOT REQUEST FALL THROUGH
F I XED 0 I SK REQUEST FALL THROUGH ERROR
01 SK PARMS
-
READ DR I VE PARAMETERS.
ON ENTRY:
01
=
DRI VE #
ON EX IT:
CLI[BP]
=
BITS 1
&
6 HIGH 2 BITS OF MAX CYLINDER
BITS 0-5 MAX SECTORS/TRACK
CHI [BP+ I]
=
LOW 8 BI TS OF MAX CYLI NDER
BLI [BP+2]
=
BITS 1-4
=
0
BITS 3-0
=
VALID CMOS DRIVE TYPE
BH/ [BP+3]
=
0
DLI[BP+4]
=
# DRIVES
INSTALLED
DH/[BP+5]
=
MAX HEAD #
DI/[BP+6]
=
OFFSET OF MEDIA/DRIVE PARAMETER TABLE
ES
=
SEGMENT OF MEDIA/DRIVE PARAMETER TABLE
AX
=
0
.
- ~~_:~ ~ ~:
--
-
- - - ~~:~:~~:::::~~~~: ~ _:~ - ~:~:::~_:~~~~: - ~~-~~:~~~ ~~~
--
FNC ERR PROC
NEAR
INVALID FUNCTION REQUEST
-
MOV
AX, S I
RESTORE AL
MOV
AH , BAD CMD
SET BAD COMMAND ERROR
MOV
tlDSKETTE_STATUS,AH
STORE IN DATA AREA
STC
SET CARRY INDICATING ERROR
RET
FNC_ERR ENDP
CALL
CALL
MOV
MOV
RET
DISK_FORMAT
551
0168 E8 08FE R
558
0 I 6B E8 09FO R
559
016E 58
560
016F E8 0121 R
561
0112
562
0112 E8 0432 R
563
0115 E8 0832 R
564
0118 8B DE
565
011 A 8A C3
566
011C C3
561
0110
568
569
510
511
512
513
514
515
0110
516
0110 8B C6
511
011F B4 01
518
0181
88 26 0041 R
519
0185 F9
580
0186 C3
581
0181
582
583
584
585
586
581
588
589
590
591
592
593
594
595
596
591
598
599
600
60
I
602
603
604
605
0181
606
0
I
81 81 FF 0080
601
018B 12 06
608
609
610
6
I
1
0 180 8B C6
6 I 2
0 1
8F B4
0 1
613
0191
F9
614
0192 C3
615
616
0193
611
0193 E8 0404 R
618
0196 C1 46 02 0000
619
019B A
I
00 lOR
620
019E 24 Cl
621
01AO DO E8
622
01 A2 13 1C
623
01 A4 DO CO
624
0
I
A6 DO CO
625
01 A8 DO CO
626
0
I
AA FE CO
621
01 AC 88 46 04
628
0
I
AF F6 06 008F R 01
629
01B4 15 03
630
01B6 E9 0256 R
631
01B9
632
01B9 83 FF 01
633
0 1BC 11 66
634
01BE C6 46 05 01
635
01 C2 E8 08CF R
636
01C5 12 16
631
0lC1 OA CO
638
01 C9 14 12
639
01 CB E8 03Bl
R
640
01 CE 12 00
641
0100 88 46 02
642
0103 2E: 8A 4F 04
643
0 I 01 2E: 8A 6F OB
644
0 I DB EB 32
645
646
0100
641
0100 8A A5 0090 R
648
OlE 1 F6 C4 10
649
01E4 14 3E
650
651
01E6
652
01 E6 80 E4 CO
653
01 E9 80 FC 80
654
01 EC 15 54
655
656
651
658
01 EE BO 01
659
01 FO E8 03Bl
R
660
01 F3 2E: 8A 4F 04
661
01F1 2E: 8A 6F OB
662
01 FB F6 85 0090 R 01
663
0200 14 00
664
665
666
661
0202
668
0202 BO 04
669
0204 E8 03Bl
R
610
0201 2E: 8A 4F 04
5-28
DISKETTE (01/10/86)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents