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
Doubt in indexing FAT Code
Moderator:Moderators
Re: Doubt in indexing FAT Code
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
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