Doubt in indexing FAT Code

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator: Moderators

Post Reply
nayeem_khan
Posts: 2
Joined: Mon May 25, 2009 12:30 pm

Doubt in indexing FAT Code

Post by nayeem_khan » Mon Jun 08, 2009 1:43 pm

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

gedd
Posts: 12
Joined: Mon Jun 08, 2009 7:08 am

Re: Doubt in indexing FAT Code

Post by gedd » Wed Jun 10, 2009 4:54 pm

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

Post Reply