Skip to content

Commit

Permalink
Fix Card Format? when MBR not present (#3)
Browse files Browse the repository at this point in the history
Change-Id: I14b2dc64b3512f024a7d1a46f36269fd20b90eca
  • Loading branch information
hoglet67 committed Mar 24, 2017
1 parent bf9ca00 commit a9e4f2b
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions FAT.asm
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,24 @@ fatclustsize%=&C3 ; byte
.ifx
RTS

\\ Boot sector signature 0x55 0xAA found

\\ FAT found - assume FAT16
\\ with MBR (partitioned disk)
\\ Test for presence of FAT Partition Boot Sector
\\ 0x000 = 0xEB xx 0x90 is a good indicator
\\ If this is not found, then assume sector 0 is an MBR

.fat
\\ VBR=MBR?
LDA cat%+&1C6
ORA cat%+&1C7
ORA cat%+&1C8
ORA cat%+&1C9
BEQ nombr

LDA cat%
CMP #&EB
BNE mbr
LDA cat%+2
CMP #&90
BNE mbr
LDA cat%+&C
CMP #&02
BEQ nombr
.mbr
\\ sec = cat!&1C6 * 2
LDA cat%+&1C6
ASL A
Expand Down

0 comments on commit a9e4f2b

Please sign in to comment.