home *** CD-ROM | disk | FTP | other *** search
- ; FDTBL: Create fixed disk table to use instead of default DOS ones.
- ; This version can ONLY be used if you aren't going to use the Diagnostic
- ; routines -- these routines screw up the memory management and overwrite the
- ; table. See accompanying program FDTBLINT if you're going to use the diags.
- ;
- ; See accompanying program fdins.c for patching this program.
- .RADIX 16
- INTR EQU (41*4)
- DISKNO EQU 80
-
- CSEG SEGMENT
- ORG 100
- ASSUME CS:CSEG,DS:CSEG
- BEGIN: JMP SHORT START
- DATA: DW 400 ; 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 400 ; landing zone cyl (usually same as number of cyl)
- DB 11 ; number of sectors per track (don't change)
- DB 0 ; reserved
- START: MOV SI,OFFSET DATA
- MOV DI,5C
- MOV AX,DI
- MOV BX,CS
- MOV ES,BX
- MOV CX,8
- CLD
- REP MOVSW
- XOR CX,CX
- MOV ES,CX
- MOV ES:[INTR],AX
- MOV ES:[INTR+2],BX
- MOV AH,9 ; "initialize characteristics"
- MOV DL,DISKNO
- INT 13
- MOV AH,0 ; "reset disk"
- INT 13
- MOV DX,7 ; retain 7 paragraphs -- first 70 hex bytes
- MOV AX,3100 ; terminate and stay resident
- INT 21
- CSEG ENDS
- END BEGIN