All Questions
4
questions
15
votes
4
answers
3k
views
Is this the reason why fread/fwrite has 2 `size_t` arguments?
It just came to me that, the C standard I/O functions fread and fwrite are having 2 size_t arguments because of I guess possibly, that on some systems, there may be more memory of which whose size can ...
2
votes
2
answers
284
views
Why isn't this invocation of XMS function Move EMB 0Bh in Turbo C correct?
Following on from my last question, I cannot get Move Extended Memory Block (Function 0Bh) working in Turbo C 2.01.
The following main.c contains only the minimum functions: get the XMS driver pointer,...
32
votes
1
answer
3k
views
Did DOS zero out the BSS area when it loaded a program?
As an example, say we have a DOS MZ EXE file that's around 20 KiB in size. The EXE header contains the value 0x1400 at offset 0x0A indicating that the program is requesting 5,120 paragraphs (or 80 KiB)...
6
votes
3
answers
2k
views
Allocate 64 KiB in Watcom C 16-bit DOS
I'm trying to allocate a 64 KiB buffer in Watcom C 16-bit DOS. I'm using the "compact" memory model which defines the code segment to be limited to 64 KiB and addressed by near pointers (...