Search code examples
assemblyusbnasmbios

Bios setting of sector


I want to boot a self-made os from usb.I seccessfully make it boot from flopy disk.But the problem happend, when I want to boot from usb, I have to read the data to disk.In flopy disk, sector and cylinder is fixed so I can easily copy it from disk.But it is not the same with usb.I want to use cheap usb to boot and my usb's structure is like this.

Disk /dev/sdb: 7.5 GiB, 7996440576 bytes, 15618048 sectors(512 bytes per sector)

So There are no cylinder no track.When I use usb, using nasm int 0x13(AH=0x02, DL=0x08), register CL memorize sectors.I want to read 70 cylinder(flopy disk) memory form disk, so totaly I need 10 * 2 *270 = 1400 sectors which CL only provide 2^8 = 256 sectors.How should I solve the problem?Do I have to buy new usb?


Solution

  • Thanks for Michael Petch.It is easy to be solved by using lba method.