Remove unused code.

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@676 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2003-09-09 17:19:10 +00:00
parent 72c8bf17b8
commit c4235b8fff

View File

@ -58,43 +58,6 @@ fl_rst1: xor ax,ax ; FALSE on error
ret ret
;
;
; Read DASD Type
;
; COUNT fl_readdasd(WORD drive)
;
; returns 0-3 if successful, 0xFF if error
;
; Code Meaning
; 0 The drive is not present
; 1 Drive present, cannot detect disk change
; 2 Drive present, can detect disk change
; 3 Fixed disk
;
%if 0
global _fl_readdasd
_fl_readdasd:
push bp
mov bp,sp
mov dl,[bp+4] ; get the drive number
mov ah,15h ; read DASD type
int 13h
jc fl_rdasd1 ; cy==1 is error
mov al,ah ; for the return code
xor ah,ah
pop bp ; C exit
ret
fl_rdasd1: mov ah,0 ; BIOS reset disketter & fixed disk
int 13h
mov ax,0FFh ; 0xFF on error
pop bp ; C exit
ret
%endif
; ;
; ;
; Read disk change line status ; Read disk change line status
@ -129,32 +92,6 @@ fl_dc_error: mov ax,0FFh ; 0xFF on error
ret ret
;
; Read the disk system status
;
; COUNT fl_rd_status(WORD drive)
;
; Returns error codes
;
; See Phoenix Bios Book for error code meanings
;
%if 0
global _fl_rd_status
_fl_rd_status:
push bp ; C entry
mov bp,sp
mov dl,[bp+4] ; get the drive number
mov ah,1 ; read status
int 13h
mov al,ah ; for the return code
xor ah,ah
pop bp ; C exit
ret
%endif
; ;
; Format Sectors ; Format Sectors
; ;
@ -238,136 +175,6 @@ fl_error:
ret ret
%if 0
;
;
; Get number of disks
;
; COUNT fl_nrdrives(VOID)
;
; returns AX = number of harddisks
;
global _fl_nrdrives
_fl_nrdrives:
push di ; di reserved by C-code ???
mov ah,8 ; DISK, get drive parameters
mov dl,80h
int 13h
mov ax,0 ; fake 0 drives on error
jc fl_nrd1
mov al,dl
fl_nrd1:
pop di
ret
%endif
; ---------------------------------------------------------------------------
; LBA Specific Code
;
;
; Added by: Brian E. Reifsnyder
; ---------------------------------------------------------------------------
;
;
; Check for Enhanced Disk Drive support (EDD). If EDD is supported then
; LBA can be utilized to access the hard disk.
;
; unsigned int lba_support(WORD hard_disk_number)
;
; returns TRUE if LBA can be utilized
;
%if 0
global _fl_lba_support
_fl_lba_support:
push bp ; C entry
mov bp,sp
mov dl,[bp+4] ; get the drive number
mov ah,41h ; cmd CHECK EXTENSIONS PRESENT
mov bx,55aah
int 13h ; check for int 13h extensions
jc fl_lba_support_no_lba
; if carry set, don't use LBA
cmp bx,0aa55h
jne fl_lba_support_no_lba
; if bx!=0xaa55, don't use LBA
test cl,01h
jz fl_lba_support_no_lba
; if DAP cannot be used, don't use
; LBA
mov ax,0001h ; return TRUE (LBA supported)
pop bp ; C exit
ret
fl_lba_support_no_lba
xor ax,ax ; return FALSE (LBA not supported)
pop bp ; C exit
ret
;
; Read Sectors
;
; COUNT fl_lba_read(WORD drive, WORD dap_segment, WORD dap_offset);
;
; Reads one or more sectors.
;
; Returns 0 if successful, error code otherwise.
;
;
; Write Sectors
;
; COUNT fl_lba_write(WORD drive, WORD dap_segment, WORD dap_offset);
;
; Writes one or more sectors.
;
; Returns 0 if successful, error code otherwise.
;
global _fl_lba_read
_fl_lba_read:
mov ah,42h ; cmd READ
jmp short fl_lba_common
global _fl_lba_write
_fl_lba_write:
mov ax,4300h ; cmd WRITE without verify
jmp short fl_lba_common
global _fl_lba_write_and_verify
_fl_lba_write_and_verify:
mov ax,4302h ; cmd WRITE with VERIFY
jmp short fl_lba_common ; This has been added for
; possible future use
global _fl_lba_verify
_fl_lba_verify:
mov ah,44h ; cmd VERIFY
fl_lba_common:
push bp ; C entry
mov bp,sp
push ds
mov dl,[bp+4] ; get the drive (if or'ed 80h its
; hard drive.
lds si,[bp+6] ; get far dap pointer
int 13h ; read from/write to drive
mov al,ah ; place any error code into al
xor ah,ah ; zero out ah
pop ds
pop bp
ret
%endif
; COUNT fl_lba_ReadWrite(BYTE drive, UWORD mode, VOID FAR *dap_p) ; COUNT fl_lba_ReadWrite(BYTE drive, UWORD mode, VOID FAR *dap_p)
; ;
; Returns 0 if successful, error code otherwise. ; Returns 0 if successful, error code otherwise.