MBR =3D Master Boot Record. This should be at the physical sector 0. That contains a small boot program that loads the first active paritition's Boot Sector plus the Primary Partition Table. At the 0x1BE you can see that partition information which lead you to the Logical Block Address (LBA) 0x2000 within the SD card. According to the picture you have provided this is the Boot Sector of the partition, so your calculation was correct. If there is an extended partition, you would see another Boot Record with a partition table information in it. Tamas On 19 December 2011 02:53, IVP wrote: > Hi all, > > I've returned to a project of a few weeks ago, and run straight into > a problem > > After finding some SDHC cards I bought had partitions, I was advised > to find the MBR by using the LBA information in the partition table, like > so > > read_fat: clr sec_adr_lo ;sector 0 > clr sec_adr_hi > mov #ram2,w8 > call getsector ;read sector into 512 bytes RAM > > ;find Boot Sector / Root Directory > > mov ram2,w0 ;test first byte of sector 0 > bra z,partition ;if 0, then MBR + partition, rea= d > 0x1c6 - 0x1c9 > ...... > > partition: mov ram2+#0x1c6,w0 ;fetch 0x1c6 and 0x1c7, LSW > mov w0,sec_adr_lo > mov ram2+#0x1c8,w0 ;fetch 0x1c8 and 0x1c9, MSW > mov w0,sec_adr_hi > mov #ram2,w8 > call getsector ;read sector > > In the attached picture, of a 4GB, Frhed shows that the MBR is at > sector 0x2000 (or 0x2000 * 0x200 bytes/sector =3D byte 0x400000), > as 0x1c6/0x1c8 say, yet requesting that sector returns nothing > > What am I missing ? I've tried reseting/re-initialising the card and > reading sector 0x2000 but with the same result > > TIA > > Joe > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > > --=20 int main() { char *a,*s,*q; printf(s=3D"int main() { char *a,*s,*q; printf(s=3D%s%s%s, q=3D%s%s%s%s,s,q,q,a=3D%s%s%s%s,q,q,q,a,a,q); }", q=3D"\"",s,q,q,a=3D"\\",q,q,q,a,a,q); } --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .