You can't use Int 21h or any other DOS interrupt service unless DOS (or WinXP or earlier) is running --hence the reason it works in the emulator and not in real-life.
The purpose of the OS is to manage software and provide access to hardware devices (such as disk drives). If you want your OS to work alone, you will have to include code to access the disk drives etc.
I suggest you read up on BIOS HD services you can use to access the hard drive etc.
Some reading on using the BIOS to access disk drives
http://www.pcguide.com/ref/hdd/bios/index.htm
BiosCentral
http://www.bioscentral.com/misc/biosservices.htm
Good luck.
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229