I try to write a bootloader for a ext2 formatted drive. I loaded the superblock to 0x7e00. Then I determined the block size by reading 24th byte. I shifted 1024 left with this value. But the cl register contains the wrong value.
Memory dump (At 0x7e00 + 24 for 4 bytes):
24>: 0x02 0x00 0x00 0x00
Shifted value: 0x400 (eax)
cl: 0x00
My Code:
mov eax, 1024
mov cl, byte [0x7e00 + 24]
shl eax, cl
mov [BLOCK_SIZE], eax
What have I done wrong?