DJGPP is a complete 32-bit C/C++ development system for Intel 80386 (and higher) PCs running DOS.
Questions tagged [djgpp]
33 questions
                    
                    9
                    
            votes
                
                1 answer
            
        Throwing C++ exceptions from a hardware exception handler. Why does -fnon-call-exceptions not behave as expected?
I had this funny idea last night, to trap hardware exceptions and throw a C++ exception instead. Thought that might be useful for things like FPU exceptions, which normally either crash, or silently return NaN and then cause unexpected behaviour. A…
         
    
    
        user5434231
        
- 579
- 3
- 16
                    9
                    
            votes
                
                1 answer
            
        Drawing a character in VGA memory with GNU C inline assembly
I´m learning to do some low level VGA programming in DOS with C and inline assembly. Right now I´m trying to create a function that prints out a character on screen.
This is my code:
//This is the characters BITMAPS
uint8_t characters[464] = {
 …
         
    
    
        Pablo Estrada
        
- 3,182
- 4
- 30
- 74
                    6
                    
            votes
                
                3 answers
            
        Need C compiler for Windows 7 64-bit, to compile to DOS target
I'm trying to find a solution to allow me to compile C code to a DOS executable from Windows 7 64-bit.  I recently updated from XP 32-bit to Win7 64-bit, and now my Borland C++ 5.0 compiler won't work.  I get an error when it tries to call tlink.exe…
         
    
    
        robisrob
        
- 940
- 12
- 23
                    3
                    
            votes
                
                3 answers
            
        How to install DJGPP
I am brand new to C and programming. I would like to use DJGPP as my compiler at this point. How can I install it? From what I understand it is multiple files. I cant seem to find a site that actually has the files that has working links. Thank…
         
    
    
        Josiah
        
- 83
- 1
- 5
                    3
                    
            votes
                
                1 answer
            
        Protected Hardware Interrupt Handler Stuck? (DJGPP)
I'm trying to set up a hardware interrupt handler in protected mode, using djgpp-2 for compiling in dosbox-0.74. Here's the smallest code possible (timer interrupt), I guess:
#include 
#include 
#include 
unsigned int…   
         
    
    
        tobywoby
        
- 85
- 5
                    3
                    
            votes
                
                0 answers
            
        Is it really necessary to lock all memory that might be touched in an interrupt handler?
Every resource I read about DPMI and interrupts says that all memory (code/data/stack) that might be used in an interrupt handler should be locked (aka pinned), to make sure it won't be paged out. The idea behind this is that when a page fault…
         
    
    
        user5434231
        
- 579
- 3
- 16
                    3
                    
            votes
                
                3 answers
            
        Compiling Assembly code
I'm trying to compile an ASM program I wrote with NASM and the "ld" command from DJGPP.  This is the code for the batch file I'm using to compiling it:
@echo off
set path=C:\NASM;%PATH%
nasm -f aout -o start.o start.asm
ld -T link.ld -o kernel.bin…
         
    
    
        Greg Treleaven
        
- 8,124
- 7
- 30
- 30
                    3
                    
            votes
                
                3 answers
            
        C(++) Compiler Transition - Make DJGPP go away please
I'm working on writing a kernel, and I have a few friends working with me on the project. We've been using DJGPP to compile the project for a while, but we're having some cross-platform compatibility issues with compiling this way that have left my…
         
    
    
        Blank
        
- 7,088
- 12
- 49
- 69
                    2
                    
            votes
                
                1 answer
            
        Porting kernel project from DJGPP to MinGW
Trying to compile a C++ kernel project with MinGW & NASM (formerly DJGPP & NASM). Have actually tried Cygwin too, with the exact same results below:
First, just swapped out \DJGPP\bin for \MinGW\bin. Got the following link error: target coff-go32…
         
    
    
        Unsigned
        
- 9,640
- 4
- 43
- 72
                    2
                    
            votes
                
                1 answer
            
        GCC cross compiler for DOS produces linker errors for simple "Hello world!" in C
I've tried to configure GCC 9.3.0 to produce executable files for DOS. However, for a simple "Hello world!" program in C, it outputs:
/home/teo.samarzija/djgpp-9.3.0/lib/gcc/djgpp/9.3.0/../../../../djgpp/bin/ld:…
         
    
    
        FlatAssembler
        
- 667
- 7
- 30
                    2
                    
            votes
                
                2 answers
            
        FreeDOS + RHIDE (DJGPP environment) = DOS Memory Corruption?
I'm running a virtual machine (using Oracle VM VirtualBox) with FreeDOS installed.
After I enter the DJGPP IDE (called "RHIDE") and run an application once, I can no longer run anything, and when I exit the IDE, I get a message saying "dos mem…
         
    
    
        Kyre
        
- 143
- 2
- 7
                    2
                    
            votes
                
                1 answer
            
        Waiting in DOS using djgpp -- alternatives to busy wait?
I recently wrote a little curses game and as all it needs to work is some timer mechanism and a curses implementation, the idea to try building it for DOS comes kind of naturally. Curses is provided by pdcurses for DOS.
Timing is already different…
        user2371524
                    2
                    
            votes
                
                1 answer
            
        Opening generic files with system() in DJGPP C
I'm missing something obvious here. I am using the DJGPP C compiler. I can successfully open executables, but not files in their default programs.
#include 
int main(void) {
    char sys_cmd[100] = "C:\\WINDOWS\\system32\\Calc.exe";
   … 
         
    
    
        user1228123
        
- 424
- 4
- 15
                    2
                    
            votes
                
                2 answers
            
        Non-interactive drive listing in DOS
I'm trying to get a list of all available drives from a C program in DOS (and I don't mean the Windows command prompt, I mean actual DOS 6.0) using the DJGPP C compiler.
I can't find an API to do this directly, so I'm just looping through the drives…
         
    
    
        Daisy Leigh Brenecki
        
- 7,571
- 6
- 28
- 43
                    2
                    
            votes
                
                2 answers
            
        How to enable the mouse in C++ program under DOS using DJGPP?
I've been using DJGPP for the first time recently and can't seem to enable mouse support. What's the best way?
Thanks for any help.
         
    
    
        Galwegian
        
- 41,475
- 16
- 112
- 158