[syslinux] Comboot Menu
ganapathy murali krishnan
gmurali at cs.uchicago.edu
Fri Jan 23 12:25:39 PST 2004
What I have found so far....
1. Create a .C file and rename "int main(void)" with "int start(void)"
2. Compile into obj (and dont link) using
wcl -3 -mt -osx -c -cc main.c
3. Compile the asm snippet below using
wasm -3 -mt snippet.asm
4. Finally link all of them together using
wlink FORMAT DOS COM FILE snippet FILE main OP nodefaultlibs
All works except I see an undefined reference for _small_code_. I still
need to see what I am doing wrong.
- Murali
ganapathy murali krishnan wrote:
> I seem to see some sunlight :-)
>
> I also wrote to Kendall (a developer of OpenWatcom) with this question.
> This was his reply... Before I try this I just want to pass it by this
> list. May be there needs to be more changes to the .asm file which
> Kendall proposed.
>
> If this works out, this should be added with SYSLINUX documentation, so
> others dont hit this road block.
>
> ------ BEGIN EMAIL -------
>
> Basically you need to link the very first object module in your program
> list as a special assembler stub that has the 'START' entry point defined
> (by default this is the runtime library). You also need to tell the
> linker NOT to use any default runtime libraries, so you will not be able
> to link until you provide this file. The linker option you want is:
>
> OP nodefaultlibs
>
> Below is some WASM assembler code that will set the startup entry point
> and do nothing but return, which you need to link as the very first
> object file in your object file list (actually I think Watcom may accept
> this anywhere in the list - Borland used to require it first in the
> list). The key is the very last line that tells the object record where
> the program entry point should be:
>
> name cstart
> assume nothing
>
> _TEXT segment use16 para public 'CODE'
>
> assume cs:_TEXT
>
> _start proc near
>
> ret
>
> _start endp
>
> _TEXT ends
>
> end _start
>
> ----- END EMAIL -----
>
>
> - Murali
>
> _______________________________________________
> SYSLINUX mailing list
> Submissions to SYSLINUX at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> Please do not send private replies to mailing list traffic.
>
>
More information about the Syslinux
mailing list