eeguru
Veteran Member
I'm getting increasingly frustrated with Watcom C in generating code for a real-mode execution environment. I'm trying to generate utility sets for various projects that will run on 8088 on up. I keep hitting weird ghost like issue with different projects that driving up frustrations and I am wondering if there is a source of information that could quickly ramp up my knowledge base of things to do and don't do in different memory models. Here are some examples of my frustrations:
1) I have an utility that traps an timer ISR using _dos_getvect and _dos_setvect. The timer ISR only increments a global static uint32_t count which I can print from main. If I compile with -ms, it works. If I compile with -ml, it doesn't work.. WTF?
2) I have another set of utilities with common code in a library. If I place printfs inside the library, none of them work if I compile the library and utilities with -ms. I have to compile both with -ml before things like printf work consistently... WTF?
I'm pulling my hair out trying to understand where these problems are coming from without having to chew through a bunch of generated assembly to root cause. Are there any resources I can consult for help?
PS. And no, I would rather not use Borland, MS, or other 16-bit compilers. I much prefer to cross compile under Linux without using an emulation environment. For reference, I am using "Open Watcom C x86 16-bit Optimizing Compiler. Version 2.0 beta"
1) I have an utility that traps an timer ISR using _dos_getvect and _dos_setvect. The timer ISR only increments a global static uint32_t count which I can print from main. If I compile with -ms, it works. If I compile with -ml, it doesn't work.. WTF?
2) I have another set of utilities with common code in a library. If I place printfs inside the library, none of them work if I compile the library and utilities with -ms. I have to compile both with -ml before things like printf work consistently... WTF?
I'm pulling my hair out trying to understand where these problems are coming from without having to chew through a bunch of generated assembly to root cause. Are there any resources I can consult for help?
PS. And no, I would rather not use Borland, MS, or other 16-bit compilers. I much prefer to cross compile under Linux without using an emulation environment. For reference, I am using "Open Watcom C x86 16-bit Optimizing Compiler. Version 2.0 beta"