It's exact, the working PC has DL = 0x80 and same for QEMUKlakap wrote:Can you figure out if dl on non-working computers is 0x00 or 0x80?
The others have 0x00
It's exact, the working PC has DL = 0x80 and same for QEMUKlakap wrote:Can you figure out if dl on non-working computers is 0x00 or 0x80?
Still DL = 0Klakap wrote:Well, this is also exact situation. DL=0x00 mean that computer is emulating USB like floppy disk. It happens because you start code with short jmp. Your computers are assuming that you have written BPB, because it also start with short jump. So BIOS read values from BPB - in this case from your code and it is why it do not work - BIOS is initalized with wrong values. Try to remove jmp from start of your code and read if dl value changed from 0x00 to 0x80. DL=0x80 mean that USB is emulates as hard disk and it is what we want.
It sounds like problem is lying in BIOS settings. Try to go to BIOS settings and look if you do not have something like USB emulating = Floppy and try to change it on Hard disk. Or if not, try to remain space for BPB:My both of my desktop do have this floppy issue
Code: Select all
jmp Bootloader.Code.Entry
times 0x3E db 0 ;BPB
Perfect, thank you very much and yes there is no setting to turn off the floppy thing.Klakap wrote:It sounds like problem is lying in BIOS settings. Try to go to BIOS settings and look if you do not have something like USB emulating = Floppy and try to change it on Hard disk. Or if not, try to remain space for BPB:My both of my desktop do have this floppy issueOr try to write BPB values for yourself.Code: Select all
jmp Bootloader.Code.Entry times 0x3E db 0 ;BPB
Oof is that a DOS thing ? https://en.wikipedia.org/wiki/BIOS_parameter_blockKlakap wrote:Great! You can edit thread title to [solved]. Just for interest, is it working with BPB as zero, or you write your own BPB?
BPB is not only DOS thing, but it is connected with FATxx system, so in this way it was also DOS thing.Oof is that a DOS thing ? https://en.wikipedia.org/wiki/BIOS_parameter_block
Thanks for answer.Yes it's worked with BPB filled with zero.
Klakap wrote:BPB is not only DOS thing, but it is connected with FATxx system, so in this way it was also DOS thing.Oof is that a DOS thing ? https://en.wikipedia.org/wiki/BIOS_parameter_blockThanks for answer.Yes it's worked with BPB filled with zero.
And for last tip for future, if BIOS emulate USB like hard disk, you can use int 13h ah=42h for reading your code. It is much more easier than ah=0x2.
Some BIOSes don't even check the instruction and blindly assume the BPB is there and just write over the area the BPB would be in when emulating a floppy device.Klakap wrote:Your computers are assuming that you have written BPB, because it also start with short jump. So BIOS read values from BPB - in this case from your code and it is why it do not work - BIOS is initalized with wrong values. Try to remove jmp from start of your code and read if dl value changed from 0x00 to 0x80.