ok, your jumping to 0x7E00:0000 is actually correct... but many other things aren't, let me try to give a partial list:
for your bootsector:
1)
you haven't set up your stack yet -- the stack the BIOS was using is not guaranteed to be valid (for practical reasons it probably will be, but you really are supposed to set up a stack before using it)
2)
this will likely work most of the time on most emulators, but will not work on real hardware -- in reality, any time you read from the disk you need to be prepared for read errors and retry the disk read -- this is especially true for the FDD
3)
this isn't really an error but it is unnecessary (since the jmp transfers execution elsewhere)
this code could be rewritten better by adding a stack setting code, and then adding code to retry the disk read if the read function returns an error
for your 2nd stage:
4)
this is actually wrong: it should be org 0
the org value is added to addresses by the assembler, and thus should be set to the offset to be added -- the starting offset from DS (not CS, and not the segment)
5)
not really an error, but completely unnecessary
6)
where is msg defined? I see it nowhere in the code you posted... most likely this is zero (as that would explain the symptoms you described)
7)
this works, but it does something unexpected... after calling print, it returns and continues executing here... making it execute print again, this time with SI pointing after the end of your previous string (this will print whatever garbage happened to be in memory after your string...)
to this point this code actually works however, but it causes this error here:
8 )
this isn't an error itself, but because of problem #7, it becomes an errror...
the first time print is called this works correctly, however because you drop into the print function after returning from the print function this ret returns to whatever was on the stack before... which means you now loose control of the CPU
worse, the CPU will continue executing random instructions from random memory until it gets to an instruction that reads/writes a hardware device, and by doing so sets that device to a bad setting which destroys the computer
while this might not happen, it will certainly not do what you want it to do
9) -- this one is out of order because of the relation between the previous 2
this instruction isn't doing what you think it is -- you haven't set DS, therefore you aren't taking the message from wherever you have it (its not anywhere in the code you posted) but rather taking it from the address 7e00 (your org statement) + offset-of-message-in-file + whatever_DS_base_happens_to_be_set_to...
this 2nd stage could be better rewritten by:
change org to 0
be sure to place the message in the same file with the 2nd stage
set DS as appropriate so it can reach your 2nd stage (where the data is)
move your
up to be between the
line and the
line
if you make the changes and fixes I described here, your code should work
edit:
do note that some emulators halt execution when they find a HLT instruction with IF=0 (like your cli;hlt instruction pair you have been using) -- sometimes this will happen before the printed text is actually displayed to the screen, if this happens replacing the cli;hlt instruction block with:
will fix it and allow the text to be displayed properly