Skip to content

Instantly share code, notes, and snippets.

@msikma
Created October 4, 2015 14:12
Show Gist options
  • Save msikma/a4d94789d893b146d29f to your computer and use it in GitHub Desktop.
Save msikma/a4d94789d893b146d29f to your computer and use it in GitHub Desktop.
#include <sys/nearptr.h>
#include <dos.h>
#include "defs.h"
#include "video.h"
byte *VGA = (byte *)0xA0000; // Pointer to the video memory.
word *SYS_CLOCK = (word *)0x046C; // The 18.2hz internal clock.
// Add the base address.
VGA += __djgpp_conventional_base;
SYS_CLOCK = (void *)SYS_CLOCK + __djgpp_conventional_base;
void set_base_addr()
{
// actually, I wanna instantiate those here.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment