Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I'm write code for reading sector from floppy disk. In the virtual machine(Bochs, qemu and VirtualBox) it works. But in the real machine memory at address 0x1000 contains 512 zeros. Why? And how to fix it?
OK, then the first thing to be concerned about is that, on real hardware, your first one or two tries at reading will often fail. The floppy drive is not a reliable device. You really need to put your code in a loop that retries at least twice more, if the first try fails. Emulators will always "succeed" if the command is formatted properly, but real hardware will not.
The next things to look at will be timing questions in your send_command() and flpydsk_read_data() functions, which you did not post. Real floppy controllers are slow, and need "handshaking". You cannot just blast bytes at their IO ports, or they will fail.