F
Familie Smeding
Hello everyone,
I've just learned C++ a bit, and i think a good exercise would be to make a
small game(after having made the hello world examples etc.)
I've read quite a bit about setting screen modes and stuff using assembler,
and I understand it all, but I can't get it to work in Dev-Cpp. This is the
first bad part of the code I'm using:
//Header stoof
#include <cstdlib>
#include <iostream>
#include <DOS.H>
#include <MEM.H>
#include <STDLIB.H>
#include <STDIO.H>
using namespace std;
//Variable declarations
unsigned char Pall[256][3];
unsigned char *vaddr = NULL;
/*some working functions go here*/
//MCGA functions
void SetMCGA() {
_AX = 0x0013;
geninterrupt (0x10);
}
void SetText() {
_AX = 0x0003;
geninterrupt (0x10);
}
It goes wrong at SetMCGA, telling me that the variable _AX isn't defined.
How do I solve this?
I'm using Dev-Cpp for Windows.
I've just learned C++ a bit, and i think a good exercise would be to make a
small game(after having made the hello world examples etc.)
I've read quite a bit about setting screen modes and stuff using assembler,
and I understand it all, but I can't get it to work in Dev-Cpp. This is the
first bad part of the code I'm using:
//Header stoof
#include <cstdlib>
#include <iostream>
#include <DOS.H>
#include <MEM.H>
#include <STDLIB.H>
#include <STDIO.H>
using namespace std;
//Variable declarations
unsigned char Pall[256][3];
unsigned char *vaddr = NULL;
/*some working functions go here*/
//MCGA functions
void SetMCGA() {
_AX = 0x0013;
geninterrupt (0x10);
}
void SetText() {
_AX = 0x0003;
geninterrupt (0x10);
}
It goes wrong at SetMCGA, telling me that the variable _AX isn't defined.
How do I solve this?
I'm using Dev-Cpp for Windows.