Questions tagged [watcom]

Open-source C/C++ and Fortran compilers for multiple 16- and 32-bit x86 target platforms.

The Watcom compiler line originated with University of Waterloo Fortran, or WATFOR, in the 1960s, widely used at universities. WATCOM was spun off into a private company and eventually the products were open-sourced.

65 questions
1
vote
2 answers

DOS/4GW Fatal Error (1307): not enough memory

I'm trying to run a dos/4gw application in Win7 32 bit OS. I'm getting the following error message, DOS/4GW fatal error (1307): not enough memory When I run the same application in WinXP 32 bit OS, it works fine and no issues. The dos/4gw…
Anand
  • 374
  • 2
  • 11
1
vote
2 answers

WATCOM FORTRAN - referenced Windows API functions are missing

Trying to compile old WATCOM FORTRAN project with an updated set of third-party OBJ files. Linker sees the third-party functions, but complains about a number (all?) of Windows API functions. I was adding different LIB and OBJ files found under…
Igor
  • 15,833
  • 1
  • 27
  • 32
1
vote
2 answers

Why direct access I/O works incorrectly with Intel Visual Fortran

This program program test real a(10) open(1, file='f1',access='direct', recl=20) do i=1, 10 a(i) = i-1 end do write(1, rec=1)(a(i),i=1,5) write(1, rec=2)(a(i),i=6,10) close(1) open(1, file='f1',access='direct',recl=8) …
Konstantin Dedov
  • 427
  • 3
  • 12
1
vote
1 answer

Open a Watcom DB with C#

So, I was just asked if I can open a watcom db file through C# as we need to retrieve some data from it, and neither Access nor Sql Server appear capable of importing it. I don't know where to begin... All I've been given is a .DB file, and those…
CaffGeek
  • 21,856
  • 17
  • 100
  • 184
1
vote
1 answer

Open Watcom Inline assembly SEG and OFFSET operators

Today, I have learned that the SEG operator in MASM by default returns the address of the GROUP and not the address of the SEGMENT of the expression in question, and that there are options and methods to override that. Since I am currently doing a…
Binarus
  • 4,005
  • 3
  • 25
  • 41
1
vote
1 answer

How I generate RAW BIN with declared segment offset using WatCom

I wrote a boot loader in NASM which is load a 64kb program data from the disk into the memory starts by address 0060:0000 [SEG:OFF]. I had tested this part of my project by Writing some code in Assembly (NASM) and put it into the disk. Works…
1
vote
0 answers

Why does OpenWatcom issue: Warning! W124: Comparison result always 0

With OpenWatcom we (a colleague and myself) receive the following warning: Warning! W124: Comparison result always 0 The code we have is of course part of a larger project, but the piece of code that results in a warning is equivalent to…
0xC0000022L
  • 20,597
  • 9
  • 86
  • 152
1
vote
1 answer

watcom inline assembly got error "Illegal use of register"

I use the Open Watcom IDE V1.9, and Target Environment is DOS-16bit,image type is exe. target cpu is 80386. Here is my source code: #include void getITV(int n); unsigned int ITV[16]; void main() { int i=0; for(i=0;i<16;i++){ …
zeyang yue
  • 53
  • 1
  • 4
1
vote
2 answers

Odd printf behaviour after calling fread

I am trying to devise a function that will load bitmap images into memory and ultimately display it. I am compiling the code with Watcom 16-bit C compiler with the target set to DOS. I am running the program in DOSBox. The code is as…
B01000100
  • 13
  • 3
1
vote
0 answers

Compile and link libxml2 with Open Watcom for Win32 console application

We have a Windows 32-bit console application written in C and compiled using Open Watcom. We would like to use the libxml2 library with our application. We found the Win32 DLL binaries, can we link them with our application's code using the Watcom…
1
vote
2 answers

Compiling 16-bit assembly code with open watcom error (multiple starting addresses found)

I am trying to compile a 16-bit assembly code snippet from the book rootkit arsenal in open watcom IDE. It gives the error "multiple starting addresses found". Having very limited amount of assembly knowledge i have not been able to sort it out.…
user1831704
  • 245
  • 1
  • 10
1
vote
2 answers

Setting up the compiler Open watcom in windows XP

I installed the compiler "Open watcom" on my OS Win XP, which I run under Virtual Box. I installed program in automode: full package and with auto changes to autoexec and config files, where all needed info for environment variables was inserted…
spin_eight
  • 3,925
  • 10
  • 39
  • 61
1
vote
1 answer

How to generate 16-bit executable BINARY RAW format from C by Watcom compiler?

I want to generate a 16-bit executable BINARY RAW format by Watcom C compiler. Something like an EXE file without any header that runs in Real Mode. I use Large memory model, Thus code segment and data segment may be different and can increase more…
Amir Saniyan
  • 13,014
  • 20
  • 92
  • 137
0
votes
2 answers

Support for common symbols in OpenWatcom C compiler

TL;DR How to use common (communal) symbols from C source code compiled with the OpenWatcom C compiler? FYI Some introductions on common symbols (mostly GCC, so it doesn't answer my question about OpenWatcom): .bss vs COMMON: what goes…
pts
  • 80,836
  • 20
  • 110
  • 183
0
votes
0 answers

Were 90s compilers not able to perform constant int-to-float typecasting at compile-time?

In the book "Black art of 3D game programming", the author talks about an optimization related to int/floating point constants. Referring to a 2d matrix of floats: // multiple statements like this a[0][1] = a[0][2] = a[0][3] = 0; he writes: As I…
Marcus
  • 5,104
  • 2
  • 28
  • 24