Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.lang.asm > #6755 > unrolled thread
| Started by | "Mike Gonta" <mikegonta@gmail.com> |
|---|---|
| First post | 2016-11-30 19:50 -0500 |
| Last post | 2016-12-07 09:57 -0500 |
| Articles | 11 — 4 participants |
Back to article view | Back to alt.lang.asm
exFAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-11-30 19:50 -0500
Re: exFAT12 Robert Wessel <robertwessel2@yahoo.com> - 2016-12-01 02:29 -0600
Re: exFAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-12-01 06:10 -0500
Re: exFAT12 Robert Wessel <robertwessel2@yahoo.com> - 2016-12-01 06:16 -0600
Re: exFAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-12-01 08:57 -0500
Re: exFAT12 Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem> - 2016-12-01 16:15 -0500
Re: exFAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-12-01 18:14 -0500
Re: exFAT12 JJ <jj4public@vfemail.net> - 2016-12-01 17:23 +0700
Re: exFAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-12-01 06:28 -0500
Re: exFAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-12-06 18:18 -0500
Re: exFAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-12-07 09:57 -0500
| From | "Mike Gonta" <mikegonta@gmail.com> |
|---|---|
| Date | 2016-11-30 19:50 -0500 |
| Subject | exFAT12 |
| Message-ID | <o1ns48$1srh$1@gioia.aioe.org> |
A gentle introduction to the exFAT file system in FASM. http://mikegonta.com/exFAT12 Mike Gonta look and see - many look but few see http://mikegonta.com
[toc] | [next] | [standalone]
| From | Robert Wessel <robertwessel2@yahoo.com> |
|---|---|
| Date | 2016-12-01 02:29 -0600 |
| Message-ID | <glmv3clfjnn6mqiu8alnd3mjfacgpdo452@4ax.com> |
| In reply to | #6755 |
On Wed, 30 Nov 2016 19:50:05 -0500, "Mike Gonta" <mikegonta@gmail.com> wrote: >A gentle introduction to the exFAT file system in FASM. > >http://mikegonta.com/exFAT12 Can you call this something other than exFAT, which is already the name of a file system for removable devices? And this is a small lump of largely undocumented assembler, with no description of purpose, usage or function. As such it really fails to be an introduction, gentle or otherwise.
[toc] | [prev] | [next] | [standalone]
| From | "Mike Gonta" <mikegonta@gmail.com> |
|---|---|
| Date | 2016-12-01 06:10 -0500 |
| Message-ID | <o1p0fv$1kfp$1@gioia.aioe.org> |
| In reply to | #6756 |
"Robert Wessel" wrote: > "Mike Gonta" wrote: > >>A gentle introduction to the exFAT file system in FASM. >> >>http://mikegonta.com/exFAT12 > > Can you call this something other than exFAT, I'm calling it exFAT12. > which is already the name of a file system for removable devices? Mount the image or transfer it to a removable device and it is recognized as exFAT. > And this is a small lump ~220 LOC > of largely undocumented assembler, One third of which contains comments and/or descriptive labels. > with no description of purpose, usage or function. As such it really > fails to > be an introduction, gentle or otherwise. I'll have to read the code to answer that one. http://mikegonta.com/exFAT12 https://redd.it/5ftj93 http://forum.osdev.org/viewtopic.php?f=2&p=268070#p268070 Mike Gonta look and see - many look but few see http://mikegonta.com
[toc] | [prev] | [next] | [standalone]
| From | Robert Wessel <robertwessel2@yahoo.com> |
|---|---|
| Date | 2016-12-01 06:16 -0600 |
| Message-ID | <ni404cp1q2ba7aqf535mp4mkn7oshf9avf@4ax.com> |
| In reply to | #6758 |
On Thu, 1 Dec 2016 06:10:33 -0500, "Mike Gonta" <mikegonta@gmail.com> wrote: >"Robert Wessel" wrote: >> "Mike Gonta" wrote: >> >>>A gentle introduction to the exFAT file system in FASM. >>> >>>http://mikegonta.com/exFAT12 >> >> Can you call this something other than exFAT, > >I'm calling it exFAT12. > >> which is already the name of a file system for removable devices? > >Mount the image or transfer it to a removable device and it is recognized as >exFAT. Oh, this is actually supposed to be MS exFAT. I've never spent much time looking at the internals of that, so I didn't recognize it. I've never bothered since the MS format is licensed and proprietary. See, a little documentation would go a long way. And if this is really straight exFAT, why call it exFAT12? Or have you taken some liberties with the format? I believe MS has claimed a minimum size of 1MB for exFAT, so a 1.44MB floppy should not be an issue on that basis. >> And this is a small lump > >~220 LOC > >> of largely undocumented assembler, > >One third of which contains comments and/or descriptive labels. Which is mostly not documentation. >> with no description of purpose, usage or function. As such it really >> fails to >> be an introduction, gentle or otherwise. > >I'll have to read the code to answer that one. > >http://mikegonta.com/exFAT12 >https://redd.it/5ftj93 >http://forum.osdev.org/viewtopic.php?f=2&p=268070#p268070
[toc] | [prev] | [next] | [standalone]
| From | "Mike Gonta" <mikegonta@gmail.com> |
|---|---|
| Date | 2016-12-01 08:57 -0500 |
| Message-ID | <o1pa9b$7v4$1@gioia.aioe.org> |
| In reply to | #6760 |
"Robert Wessel" wrote:
> "Mike Gonta" wrote:
>>"Robert Wessel" wrote:
>>> "Mike Gonta" wrote:
> Oh, this is actually supposed to be MS exFAT. I've never spent much
> time looking at the internals of that, so I didn't recognize it.
{code]
org 0x7C00
boot_sector:
jmp boot
nop
file_system_name: db "EXFAT "
[/code]
One of the requirements of exFAT is that the beginning of the volume
boot sector has "EXFAT " in what is the OEM field in FAT.
> I've never bothered since the MS format is licensed and proprietary.
> See, a little documentation would go a long way.
My documentation is the patents.
> And if this is really straight exFAT,
The format generated is.
> why call it exFAT12? Or have you taken some liberties with the
> format?
This is a simple single boot sector boot loader which loads a named
file from the root directory of an exFAT volume in the same vain as
FAT12. It only supports ASCII (7 bit) and 8 dot 3 filenames in a limited
root directory. I've taken the "liberty" of preallocating 15 root
directory clusters (which are the same size as the supported 512 byte
sectors). While "non standard", it's perfectly OK. One of the features
of exFAT is the supported ability to preallocate contiguous file
clusters. There is of course nothing stopping the user's system from
allocating (when necessary) more clusters which will then cause the file
to be linked in the FAT and not completely contiguous, however this is a
case of "too many files" for a small simple system. As such the boot
loader only reads the 15 contiguous root directory sectors and ignores
the FAT completely. Unlike FAT32 long file names all file names in exFAT
are only "long" with a minimum of 3 file directory entries (which will
accomodate the first 15 Unicode wide characters - 8 dot 3 is 12
characters) to a maximum of 19 entries for the max 255 characters. With
8 dot 3 the 15 preallocated root directory sectors (in this case) can
accomodate 79 files (one each of 3 entries are used by the volume label,
the allocation bitmap and the upcase table).
> I believe MS has claimed a minimum size of 1MB for exFAT, so a 1.44MB
> floppy should not be an issue on that basis.
Windows will not support exFAT on floppy disks. Also an image which is
not the same size as the actual device is not supported unless it is a
partitioned image (of which Windows only supports the first partitioned
volume). To keep the code simple the boot sector boot loader contains a
self referencing MBR table so that the 1.44MB image when mounted or
transferred to a flash drive is supported by Windows.
>>> And this is a small lump
>>~220 LOC
>>> of largely undocumented assembler,
>>One third of which contains comments and/or descriptive labels.
> Which is mostly not documentation.
Which is mostly "documentation" for "self documenting" assembly language
code.
http://mikegonta.com/exFAT12
https://redd.it/5ftj93
http://forum.osdev.org/viewtopic.php?f=2&p=268070#p268070
Mike Gonta
look and see - many look but few see
http://mikegonta.com
[toc] | [prev] | [next] | [standalone]
| From | Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem> |
|---|---|
| Date | 2016-12-01 16:15 -0500 |
| Message-ID | <20161201161514.1b96527f@_> |
| In reply to | #6761 |
On Thu, 1 Dec 2016 08:57:43 -0500 "Mike Gonta" <mikegonta@gmail.com> wrote: > "Robert Wessel" wrote: > > I believe MS has claimed a minimum size of 1MB for exFAT, so a > > 1.44MB floppy should not be an issue on that basis. > > Windows will not support exFAT on floppy disks. Interesting. Why not? Does it need an 0xAA55 signature? What about USB stick with an exFAT or exFAT12 floppy image? What about USB stick with an exFAT or exFAT12 hard disk image? What about floppy with an exFAT or exFAT12 hard disk image instead of a floppy image? Rod Pemberton
[toc] | [prev] | [next] | [standalone]
| From | "Mike Gonta" <mikegonta@gmail.com> |
|---|---|
| Date | 2016-12-01 18:14 -0500 |
| Message-ID | <o1qatm$4oe$1@gioia.aioe.org> |
| In reply to | #6762 |
"Rod Pemberton" wrote: > "Mike Gonta" wrote: >> "Robert Wessel" wrote: > >> > I believe MS has claimed a minimum size of 1MB for exFAT, so a >> > 1.44MB floppy should not be an issue on that basis. >> >> Windows will not support exFAT on floppy disks. > > Interesting. I thought that it might be. > Why not? I tried it on XP and WIN7 - it doesn't work. > Does it need an 0xAA55 signature? Many. In addition to the standard signature in the boot sector, the additional 8 extended boot sectors each require a 0xAA550000 (note 32 bit) at the end of each. Windows will not refuse to mount the volume if they are not there, however chkdsk will complain that the boot region is corrupt and will not continue. On top of that, the last (12th) sector of the boot region is made up entirely of a repeating 32 bit checksum of the other 11 sectors (the volume flags and percent in use variables in the BPB are not checksummed). On top of that, these entire 12 sectors are followed by an exact copy to make up the 24 fixed "reserved sectors" known as the boot sector region. > What about USB stick with an exFAT or exFAT12 floppy image? > What about USB stick with an exFAT or exFAT12 hard disk image? > > What about floppy with an exFAT or exFAT12 hard disk image instead > of a floppy image? There is no way to differentiate the two, it can only be an exFAT image. There is only one partition type code (0x07) shared with NT and OS/2. The 53 bytes in the BPB from 11 to 64 must be zero so that the OS does not confuse it with FAT. As a novelty / simple hobby system use the exFAT12 can be mounted and emulated or transferred to a flash drive. Windows, however will not mount the flash drive if the volume length (in the BPB and in this case 2880) is not the same as the physical size of the device unless the device is partitioned. For simplicity, the exFAT12 BPB includes a self referencing MBR table to get around this. http://mikegonta.com/exFAT12 https://redd.it/5ftj93 http://forum.osdev.org/viewtopic.php?f=2&p=268070#p268070 Mike Gonta look and see - many look but few see http://mikegonta.com
[toc] | [prev] | [next] | [standalone]
| From | JJ <jj4public@vfemail.net> |
|---|---|
| Date | 2016-12-01 17:23 +0700 |
| Message-ID | <107h5ux8tt6uz.89cygzp4m0ye.dlg@40tude.net> |
| In reply to | #6755 |
On Wed, 30 Nov 2016 19:50:05 -0500, Mike Gonta wrote: > A gentle introduction to the exFAT file system in FASM. > > http://mikegonta.com/exFAT12 > > Mike Gonta > look and see - many look but few see > > http://mikegonta.com Where's the exFAT12 reader+writer? (not the formatter)
[toc] | [prev] | [next] | [standalone]
| From | "Mike Gonta" <mikegonta@gmail.com> |
|---|---|
| Date | 2016-12-01 06:28 -0500 |
| Message-ID | <o1p1i5$1mnf$1@gioia.aioe.org> |
| In reply to | #6757 |
"JJ" wrote: > "Mike Gonta" wrote: >> A gentle introduction to the exFAT file system in FASM. >> >> http://mikegonta.com/exFAT12 > Where's the exFAT12 reader+writer? (not the formatter) exFAT requires a script to process the boot loader code to generate the required checksums located in the formatted image. For example you cannot merely format the device and then inject the boot loader code as you can with a FAT32 image. You can however, format the device and use the script to extract the relevant formatting information to generate and replace the 24 sector main boot region. http://mikegonta.com/FASM_exFAT_Image_Formatter For simplicity, I've included the boot loader, the script (FASM preprocessor) and the formatted image all in the same code. http://mikegonta.com/exFAT12 https://redd.it/5ftj93 http://forum.osdev.org/viewtopic.php?f=2&p=268070#p268070 Mike Gonta look and see - many look but few see http://mikegonta.com
[toc] | [prev] | [next] | [standalone]
| From | "Mike Gonta" <mikegonta@gmail.com> |
|---|---|
| Date | 2016-12-06 18:18 -0500 |
| Message-ID | <o27gv8$1v9a$1@gioia.aioe.org> |
| In reply to | #6755 |
"Mike Gonta" wrote: >A gentle introduction to the exFAT file system in FASM. exFAT boot sector boot loader and pre-processor FASM assembly language code to format a 1.44MB image for emulation or transfer to USB boot and run. The single sector boot sector boot loader contains a subset of a complete read-only exFAT file system driver. In order to fit completely in the restricted size of a boot sector some restrictions apply. * The loaded file name must be no more than 12 ascii (7 bit) characters in the 8 dot 3 style (the dot is optional). * One sector per cluster. * Maximum file size of 127 (512 byte supported) sectors loaded at 0x1000:0000. * Minimal single character numerical error code display. Statistics for bit counters. * 120 bytes for the mandatory BPB (58 bytes more than FAT12 and 30 bytes more than FAT32). * 16 bytes for a self-referencing MBR partition table entry. This allows the transferred image to USB to be mounted by Windows which will not mount an exFAT formatted device with a BPB volume_length less than the physical capacity unless it's partitioned. * 12 bytes for loaded file name. * 2 bytes for the manditory 0xAA55 signature. * 9 unused bytes That leaves a whopping 353 bytes for code and data. ~430 LOC of commented FASM assembly language. http://mikegonta.com/exFAT12 https://board.flatassembler.net/topic.php?p=192148#192148 http://forum.osdev.org/viewtopic.php?f=2&t=31044 https://redd.it/5gw4lv Mike Gonta look and see - many look but few see http://mikegonta.com
[toc] | [prev] | [next] | [standalone]
| From | "Mike Gonta" <mikegonta@gmail.com> |
|---|---|
| Date | 2016-12-07 09:57 -0500 |
| Message-ID | <o29812$duq$1@gioia.aioe.org> |
| In reply to | #6768 |
The exFAT12 tutorial (a bit skimpy, but a work in progress) is available and feedback would be appreciated. http://mikegonta.com/exFAT12 https://board.flatassembler.net/topic.php?p=192148#192148 http://forum.osdev.org/viewtopic.php?f=2&t=31044 https://redd.it/5gw4lv Mike Gonta look and see - many look but few see http://mikegonta.com
[toc] | [prev] | [standalone]
Back to top | Article view | alt.lang.asm
csiph-web