Watcom C Stack
Watcom C Stack
I am currently building my second stage with Watcom C. My bootloader sets the second stage programs stack before jumping to it. It would appear the program is setting itself one equal to DS. I have "Assume stack segment not equal to DS" off so it assumes its already set i would imagine. Is there another setting i need to check so it stops doing this?
Re: Watcom C Stack
I once tried writing a second stage loader partly in C, to do some of the heavy lifting. I cannot now remember what all the problems were, but I know I gave up the unequal fight. If you want to write a loader in C, you will probably have to look towards EFI, but that has got a learning curve of its own, unless you are already familiar with it.
Re: Watcom C Stack
I manned up about it and just did it in assembler.