x86 Assembly

Moderators: None (Apply to moderate this forum)
Number of threads: 4563
Number of posts: 16029

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Re: how can i check type of file system? Posted by anthrax11 on 7 Nov 2005 at 11:50 AM
: : i use nasm assembler, but i must determine the type of file system. how can i do this program?
: :
:
:
: Check this site out. I would bookmark it since it has other good info on OS level stuff.
:
: http://www.nondot.org/sabre/os/articles/FileSystems/
:
:
:

:

There is an undocumented DOS interrupt function that can get that information. Took me some time to find it again.
I dont know if this matches the NASM syntax, but it's easy to convert..
Try this:
;Interrupt 0x21 subfunction 0x69(Get/Set Disk Serial Number)
MOV ah,0x69

;AL=0 - get serial number
;AL=1 - set serial number
MOV al,0

;Drive to check
;BL=0 - Default drive
;BL=1 - A drive
;BL=2 - B drive
;BL=3 - C drive
;BL=...
MOV bl,3

;DS:DX - Pointer to the buffer to contain extended BIOS parameter block
;Set DS if needed
MOV dx,offset ParamBlock

INT 0x21

;Structure of the parameter block:
ParamBlock:
infolevel    db 0
serialnumber dd ?
volumelabel  db 11 dup(?)
filesystem   db 8  dup(?) ;This is what you need

;After calling int 0x21 the 8-byte string filesystem will hold 
;the name of the file system. If it is FAT32 then the string will
;be "FAT32   ", if FAT16 then it will be "FAT16   " and so on.

Hope this helps!

Thread Tree
mandla82 how can i check type of file system? on 18 Oct 2005 at 8:40 PM
shaolin007 Re: how can i check type of file system? on 19 Oct 2005 at 11:21 AM
anthrax11 Re: how can i check type of file system? on 7 Nov 2005 at 11:50 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.