Page 1 of 1

Doubt in indexing FAT Code

Posted: Mon Jun 08, 2009 1:43 pm
by nayeem_khan
Hi

In FAT index code,we have
Since we have to take 12 high bits in case of odd cluster can we do in following way

.ODD_CLUSTER:
and dx, 1111111111110000b ; take high twelve bits


Whats the significance of shr,as per my logic it should be shift left?

from
khan

Re: Doubt in indexing FAT Code

Posted: Wed Jun 10, 2009 4:54 pm
by gedd
Take dx = 0xABCD

with : and dx, 0000111111111111b
then dx = 0x0BCD --> low 12 bits of 0xABCD

with : shr dx, 0x0004
then dx =0x0ABC --> hight 12 bit of 0xABCD

You have two entry of FAT 12 in three byte

three byte 0x01 0x23 0x45 --> 012345
Entry one
Entry two