this is broken down, i don't know why?
fate: inc cx
mov ah,10h
mov dl,00h
int 13h floppy in PC (C=0=ok or C=1=error) (int this code is C=1 why? floppy is in PC why?)
mov ah,00h
mov dl,00h
int 13h loading "floppy"
jnc fatd
cmp cx,08h
je fata is not ok
jmp fate is ok
Interrup 13h funkcjon 00h and 10h
Re:Interrup 13h funkcjon 00h and 10h
To load sectors: use ah=02, and al=total sectors to load....
You could only read up to the end of the track ( at a time)
It contains all the int13h commands.
HTH, DennisCGc.
You could only read up to the end of the track ( at a time)
is actually this:fate: inc cx
mov ah,10h
mov dl,00h
int 13h floppy in PC (C=0=ok or C=1=error) (int this code is C=1 why? floppy is in PC why?)
Int 13/AH=10h - HARD DISK - CHECK IF DRIVE READY
You're trying to read the floppy with the reset command, look at this.mov ah,00h
mov dl,00h
int 13h loading "floppy"
It contains all the int13h commands.
HTH, DennisCGc.
Re:Interrup 13h funkcjon 00h and 10h
what is the alternative form interrput 13h funkcion 10h for floppy?
floppy in PC is OK
floppy not i PC is ERROR
Plese help i dont konow
floppy in PC is OK
floppy not i PC is ERROR
Plese help i dont konow
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Interrup 13h funkcjon 00h and 10h
what exactly do you want to know ? if a disk is present in the floppy controller ?
Since the user could remove the media at any moment, of what use is that information, anyway ? just issue a read command and see if it succeeded. After 3 consecutive failure on the same sector, you're rather sure that there's an error. complain and 'hit any key to reboot' ... (or complain and halt)
Since the user could remove the media at any moment, of what use is that information, anyway ? just issue a read command and see if it succeeded. After 3 consecutive failure on the same sector, you're rather sure that there's an error. complain and 'hit any key to reboot' ... (or complain and halt)
Re:Interrup 13h funkcjon 00h and 10h
ERROR (floppy not in PC) = STOP program, why?
OK = read clusters and is OK
I will ERROR = jump to fata (is) and run rest program
fatd: xor ax,ax
xor bx,bx
xor cx,cx
xor bx,bx
mov ah,02h
mov al,11h
mov ch,00h
mov cl,01h
mov dl,00h
mov dh,00h
push cs
pop es
mov bx,fatfile
int 13h
jc fata <--- if error jump to fata
OK = read clusters and is OK
I will ERROR = jump to fata (is) and run rest program
fatd: xor ax,ax
xor bx,bx
xor cx,cx
xor bx,bx
mov ah,02h
mov al,11h
mov ch,00h
mov cl,01h
mov dl,00h
mov dh,00h
push cs
pop es
mov bx,fatfile
int 13h
jc fata <--- if error jump to fata
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Interrup 13h funkcjon 00h and 10h
it's a bit hard to guess what you're asking, but i guess knowing that its *normal* for the FD controller to fail reading sectors the first time you ask the track a good news.
When asking the floppy a sector, the motor needs to start spinning, the heads must move, the logic must calibrate its thresholds to the amplitude and exact frequency of the signal on the media and so on. As the floppy controller is usually very low-level hardware, it's common for INT13h to fail once or twice on some systems. Only three successive failures (after a reset) should be considered as a real error.
When asking the floppy a sector, the motor needs to start spinning, the heads must move, the logic must calibrate its thresholds to the amplitude and exact frequency of the signal on the media and so on. As the floppy controller is usually very low-level hardware, it's common for INT13h to fail once or twice on some systems. Only three successive failures (after a reset) should be considered as a real error.
Re:Interrup 13h funkcjon 00h and 10h
I please small code of this problem, please if you have, OK?
I look for you code OK?
This is my proceture:
discfail db 0
fatfile times 9216 db 0
rootfile times 7168 db 0
errorfl db "Error: disc is not ready", 0x00
_fat: xor cx,cx
clc
jmp fate
fate: inc cx
mov ah,0eh
mov al,41h
int 10h
mov ah,00h
mov dl,00h
int 13h
jnc fatd
cmp cx,08h
je fata
jmp fate
fatd: xor ax,ax
xor bx,bx
xor cx,cx
xor bx,bx
mov ah,02h
mov al,11h
mov ch,00h
mov cl,01h
mov dl,00h
mov dh,00h
push cs
pop es
mov bx,fatfile
int 13h
jc fata <-- this moment, read error=exit of prcedure
mov ah,02h
mov al,01h
mov ch,01h
mov cl,00h
mov dl,00h
mov dh,00h
push cs
pop es
mov bx,fatfile
add bx,2200h
int 13h
mov ah,02h
mov al,0eh
mov ch,01h
mov cl,01h
mov dl,00h
mov dh,00h
push cs
pop es
mov bx,rootfile
int 13h
ret
fata: push cs
pop ds
mov ax,errorfl
mov si,ax
jmp fatb
fatb: lodsb
cmp al,00h
je fatc
mov ah,0eh
int 10h
jmp fatb
fatc: ret <--- exit of procedure if error, I dont know why not exit of proceture?
I look for you code OK?
This is my proceture:
discfail db 0
fatfile times 9216 db 0
rootfile times 7168 db 0
errorfl db "Error: disc is not ready", 0x00
_fat: xor cx,cx
clc
jmp fate
fate: inc cx
mov ah,0eh
mov al,41h
int 10h
mov ah,00h
mov dl,00h
int 13h
jnc fatd
cmp cx,08h
je fata
jmp fate
fatd: xor ax,ax
xor bx,bx
xor cx,cx
xor bx,bx
mov ah,02h
mov al,11h
mov ch,00h
mov cl,01h
mov dl,00h
mov dh,00h
push cs
pop es
mov bx,fatfile
int 13h
jc fata <-- this moment, read error=exit of prcedure
mov ah,02h
mov al,01h
mov ch,01h
mov cl,00h
mov dl,00h
mov dh,00h
push cs
pop es
mov bx,fatfile
add bx,2200h
int 13h
mov ah,02h
mov al,0eh
mov ch,01h
mov cl,01h
mov dl,00h
mov dh,00h
push cs
pop es
mov bx,rootfile
int 13h
ret
fata: push cs
pop ds
mov ax,errorfl
mov si,ax
jmp fatb
fatb: lodsb
cmp al,00h
je fatc
mov ah,0eh
int 10h
jmp fatb
fatc: ret <--- exit of procedure if error, I dont know why not exit of proceture?
Re:Interrup 13h funkcjon 00h and 10h
Code: Select all
discfail db 0
fatfile times 9216 db 0
rootfile times 7168 db 0
errorfl db "Error: disc is not ready", 0x00
_fat: xor cx,cx
clc
jmp fate
fate: inc cx
mov ah,0eh
mov al,41h
int 10h
mov ah,00h
mov dl,00h
int 13h
jnc fatd
cmp cx,08h
je fata
jmp fate
fatd:
xor ax,ax
xor bx,bx
xor cx,cx
xor dx,dx
mov ah,02h
mov al,11h
mov ch,00h
mov cl,01h
;don't have to reset dx, dx = 0
;
push cs
pop es
mov bx,fatfile
int 13h
jc fata ;<-- this moment, read error=exit of prcedure
;I think this is weird.. cylinder 1 ? should be head 1, I think
mov ah,02h
mov al,01h
mov ch,00h ;was mov ch,01h
mov cl,00h
mov dl,00h
mov dh,01h ;was mov dh,00h
push cs
pop es
mov bx,fatfile
add bx,2200h
int 13h
mov ah,02h
mov al,0eh
mov ch,01h
mov cl,01h
mov dl,00h
mov dh,00h
push cs
pop es
mov bx,rootfile
int 13h
;here your process code
halt:
jmp halt
fata: push cs
pop ds
mov ax,errorfl
mov si,ax
call fatb
jmp fatd
fatb: lodsb
cmp al,00h
je fatc
mov ah,0eh
int 10h
jmp fatb
fatc:
ret