Watcom C Stack

Programming, for all ages and all languages.
Post Reply
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Watcom C Stack

Post 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?
Casm
Member
Member
Posts: 221
Joined: Sun Oct 17, 2010 2:21 pm
Location: United Kingdom

Re: Watcom C Stack

Post 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.
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: Watcom C Stack

Post by VolTeK »

I manned up about it and just did it in assembler.
Post Reply