Page 1 of 1

Watcom C Stack

Posted: Mon May 07, 2012 6:53 pm
by VolTeK
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

Posted: Mon May 21, 2012 4:24 pm
by Casm
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

Posted: Mon May 21, 2012 7:31 pm
by VolTeK
I manned up about it and just did it in assembler.