delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/07/07/10:16:34

To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: how do I get version in djgcc?
Date: Thu, 7 Jul 1994 06:37:21 PDT
From: "Marty Leisner" <leisner AT sdsp DOT mc DOT xerox DOT com>


What am I doing wrong?

Supposedly intdos is supposed to work.

Program:


#include <dos.h>

int get_version(int *major, int *minor)
{ 	
	union REGS regs;

	regs.h.ah = 0x31;
	regs.h.al = 0x6;
	intdos(&regs, &regs);
	printf("ax = %x\n", regs.x.ax);
	printf("Major =  %d\n", regs.h.bl);
	printf("Minor = %d\n", regs.h.bh);
	printf("revision bis = %x\n", regs.x.dx);

	*major = regs.h.bl;
	*minor = regs.h.bh;
	return regs.x.ax;
	
}

#ifdef TEST
main()
{
	int major, minor;

	get_version(&major, &minor);
}
#endif

gcc 202$make

gcc -g  -DTEST getvers.c -o getvers
coff2exe        getvers
gcc 203$getvers
getvers: not found
gcc 204$./getvers
Unsupported DOS request at eip=4210
eax=00003106 ebx=00000000 ecx=00000000 edx=00051be8 esi=000018ba edi=0000000c
ebp=00051ba8 esp=00051b8c cs=af ds=a7 es=a7 fs=a7 gs=a7 ss=b7 cr2=00001fe3
Call frame traceback EIPs:
  0x00004210   __smallbuf+48
  0x000015a4   _intdos+16
  0x000011f5   _get_version+27, line 10 of getvers.
  0x0000126e   _main+24, line 27 of getvers.
gcc 205$symify
Usage: symify <program>
This program replaces the stack dumps from go32 with debug info
gcc 206$symify getvers


marty
Member of the League of Programming Freedom
leisner AT sdsp DOT mc DOT xerox DOT com  leisner AT eso DOT mc DOT xerox DOT com





marty
leisner AT sdsp DOT mc DOT xerox DOT com  
Member of the League for Programming Freedom
"I just know I'm a better manager when I have Joe DiMaggio in center field" -- 
Casey Stengel


- Raw text -


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