As hextakatt states, the DL register specifies which drive you are booting from. However, you do not hard code this at all. This is given at POST. i.e.: at the time your code receives control the DL register is already set to the value of the media it is booting from.
However, to read from a hard drive, especially one larger than 500meg, you will need to use LBA addressing instead of CHS addressing.
To do so, you can use the MS Extension services which allow up to 64-bits of LBA addressing (though it may not actually support all 64-bits).
Search for the services where AH starts with 4xh, i.e.: AH = 42h is the read service. You will need to check for the support of these services as well.
Ben
-
http://www.fysnet.net/osdesign_book_series.htm