home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd2.bin
/
dosutils
/
partprog
/
pdisk.arc
/
FDTBLINT.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-01-12
|
2KB
|
45 lines
; FDTBLINT: Create fixed disk table to use instead of default DOS ones.
; This version should normally only be used if you plan to use the IBM
; diagnostic routines -- these routines screw up the memory management and
; overwrite the table of FDTBL. See accompanying program FDTBL, otherwise.
;
; See accompanying program fdins.c for patching this program.
INTR EQU (41H*4)
DISKNO EQU 80H
INTR64 EQU (64H*4) ; use reserved for users intrs 64 to 67 to store table
CSEG SEGMENT
ORG 100H
ASSUME CS:CSEG,DS:CSEG
BEGIN: JMP SHORT START
DATA LABEL BYTE
DW 1024 ; number of cylinders
DB 4 ; number of heads
DW -1 ; starting reduced write current cylinder (XT only)
DW -1 ; starting write precompensation cylinder
DB 0 ; max ECC data burst length (XT only)
DB 0 ; control byte
DB 0 ; standard time out value (XT only)
DB 0 ; format time out value (XT only)
DB 0 ; check drive time out value (XT only)
DW 1024 ; landing zone cyl (usually same as number of cyl)
DB 17 ; number of sectors per track (don't change)
DB 0 ; reserved
START: MOV SI,OFFSET DATA ; whence (offset part. segment part set in DS)
MOV DI,INTR64 ; whither (offset part)
XOR CX,CX ; whither (segment part)
MOV ES,CX
MOV ES:[INTR],DI ; update pointer to table (offset part)
MOV ES:[INTR+2],CX ; (segment part)
MOV CX,8 ; length (in words) of table)
REP MOVSW ; move it in
MOV AH,9 ; "initialize characteristics"
MOV DL,DISKNO
INT 13H
MOV AH,0 ; "reset disk"
INT 13H
MOV AX,4C00H ; terminate
INT 21H
CSEG ENDS
END BEGIN