ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/10/10:00:26

From: "R. Brenner" <rene DOT brenner AT NO_SPAM_PLZbluewin DOT ch>
Newsgroups: comp.os.msdos.djgpp
Subject: problems with crt0_startup_flags
Date: Mon, 10 Aug 1998 15:46:15 +0200
Organization: Swisscom AG, the blue window
Lines: 30
Message-ID: <6qmte0$1j3$1@bw107zhb.bluewin.ch>
NNTP-Posting-Host: zhb48pub139.bluewin.ch
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I'm using some code in my programs which need
the following code at the beginning:
int _crt0_startup_flags = _CRT0_FLAG_NEARPTR | _CRT0_FLAG_NONMOVE_SBRK;

As soundroutine I use the MIDAS soundsystem
which already sets this startup flags...so I get an error
if redefine them. So, what should I change in my code
for using it without the crt0_startup_flags  ?
If I remove the flags it will crash.

code which uses crt0_startup_flag, otherwise it will crash:

int mode;
int bpp,xres,yres;

  __dpmi_regs regs;
  __dpmi_meminfo mem;
  ...
  mem.size = yres*xres*(bpp+1);
  mem.address = modeinfo.PhysBasePtr;
  __dpmi_physical_address_mapping(&mem);

  addr=mem.address;
  video_pointer = (unsigned char *)(addr + __djgpp_conventional_base);
  vid_point = (unsigned short *)video_pointer;
*** Note: this pointers make problems without
the startup flags



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019