please help me with fat 12 File system

hi has anybody got any source code to list the files in the current directory without using dos interrupts?

if you know how to do this, please email me:


edwin_rhodes@hotmail.com

many thanks

edwin

Comments

  • : hi has anybody got any source code to list the files in the current directory without using dos interrupts?
    :

    Do you not want to use DOS interrupts (INT 25 absolute read), or are you trying to avoid interrupts altogether? INT 13 read sector is a BIOS interrupt, is that OK?

    Are you doing this on a floppy or HDD?

    here's some nice information about fats with asm source:

    http://home.no.net/tkos/info/fat.html

    -jeff!
  • Hi, i am trying to do this from floppy, using bios interrupts. The program i am writing is loaded instad of dos, ie NO DOS ints work unless i write them into the program.

    please help with som code!!!

    many thanks

    edwin
  • : Hi, i am trying to do this from floppy, using bios interrupts. The program i am writing is loaded instad of dos, ie NO DOS ints work unless i write them into the program.
    :
    : please help with som code!!!
    :
    : many thanks
    :
    : edwin
    :
    ===================================================================

    Edwin: 10/13/03
    Try these. I have used them with success in the past.

    ;This code reads the file directory of A: (1.44MB) at 0200H.

    MOV CH,00H ;8 LSBs=cyl #
    MOV CL,02H ;2 MSBs=cyl #, 6 LSBs= starting sect #
    MOV DH,01H ;head #
    MOV DL,00H ;Drive #:00H=A,01H=B,80H=C,81H=D,etc
    MOV BX,0200H ;buffer of result
    MOV AH,02H ;Read disk function
    MOV AL,11H ;# sectors to read
    INT 13H ;ROM BIOS disk service
    NOP ;-G to this location, 0111H

    ;This code reads the file directory of C: at 0200H.

    MOV CH,00H ;8 LSBs=cyl #
    MOV CL,2AH ;2 MSBs=cyl #, 6 LSBs= starting sect #
    MOV DH,09H ;head #
    MOV DL,80H ;Drive #:00H=A,01H=B,80H=C,81H=D,etc
    MOV AH,02H ;Read disk function
    MOV AL,37H ;# sectors to read
    MOV BX,0200H ;buffer of result
    INT 13H ;ROM BIOS disk service
    NOP ;-G to this location, 0111H

    You can assemble then use DEBUG -G111 to see the file directory at
    -D 0200H.

    ;This code can be used to read the file directories of 3.5" 720K and 1.44MB floppies.

    MOV AL,00H ;Drive 00H=A, 01H=B, 02H=C, etc
    MOV CX,0020H ;Number of sectors to read
    MOV DX,0013H ;Log addr 1st dir sect,DL=13H-1.44M,07H-720K
    MOV BX,0200H ;Memory location where directory sectors will
    ;be written
    INT 25H ;Absolute disk read function
    NOP ;-G to this location

    Hope these help you.
    triggerme


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories