I try to make my bootloader, but have trouble with data address offset after linking.
Here my wlink config:
Code: Select all
FILE MBR.asm.obj
FILE MBR.c.obj
NAME MBR.bin
OUTPUT raw
OPTION nodefaultlibs, quiet, start=_start
DISABLE 1014
ORDER
clname CODE
clname DATA
FORMAT dos
If use next:
Code: Select all
FILE MBR.asm.obj
FILE MBR.c.obj
NAME MBR.bin
OUTPUT raw
offset = 0x7c00
OPTION nodefaultlibs, quiet, start=_start
DISABLE 1014
ORDER
clname CODE offset = 0x7c00
clname DATA
FORMAT dos
If use next:
Code: Select all
FILE MBR.asm.obj
FILE MBR.c.obj
NAME MBR.bin
OUTPUT raw
offset = 0x7c00
OPTION nodefaultlibs, quiet, start=_start
DISABLE 1014
ORDER
clname CODE offset = 0x7c00
clname DATA offset = 0x7d00
FORMAT dos
How I can set wlink to place DATA right after CODE and use global offset 0x7c00?