flat assembler
Message board for the users of flat assembler.

Index > Heap > usb boot problems

Author
Thread Post new topic Reply to topic
b1528932



Joined: 21 May 2010
Posts: 287
b1528932
My bios is able to boot from usb. At least its detecting usb device correctly and persent it in boot menu.

I copied 512 bytes into 0-511 bytes of my flash drive, its a valid bootsector. It doesnt contain partition table, but does it matter to bios, i dont think so.
Code:
org 0x7C00
use16



mov al,0
mov ah,13h
mov bl,0x4F
mov bh,0
mov cx,10
mov dh,0
mov dl,0


push 0
pop es
mov bp,_str
int 10h


cli
hlt

_str db 'ASDF123$%&'
db 510 - ($ - $$) dup 0
db 0x55, 0xAA
    


then i copied it (and checked if its really there) to 1st 'sector' of my usb drive.

When i rebooted pc, something was going on on my drive because its led flashed, and it was like it for many minutes, i belive it takes shorter time to copy 512 bytes to 7c00. What is the problem? What i missed? Why cant i boot that way? What can be done about it?


//ok i see it, push/pop, change to register usage and edit my post...
Post 17 Jan 2011, 11:55
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.