Since he begins to execute code directly in the team at 7c00
. This, unfortunately, is where you have your string.
You must precede this line with the jmp
statement so that it jumps to start
.
This is usually a short EB xx
jump followed by a NOP 90
. Some BIOSes may insist on having this shape, even if it does not really matter to the processor.
In other words, you will look for something like:
org 0x7c00 bits 16 realstart: jmp short start nop str: db "Some say the world will end in fire",10,13 : db "Robert Frost - Fire and Ice" db 0 start: xor ax,ax :
Just keep in mind that a short jump is limited with respect to how far it can go, approximately +/- 128 bytes, so the size of your string will be necessarily limited by this. If your BIOS does not require EB xx 90
format, you can simply perform the usual transition.
Another thing you could try is to move the entire line after the hlt
:
org 0x7c00 bits 16 start: xor ax,ax : end: cli hlt str: db "Some say the world will end in fire",10,13 : db "Robert Frost - Fire and Ice" db 0
but, again, it depends on your BIOS, which does not require jmp/nop
combos at the beginning.
source share