www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/04/12/17:36:03

From: mmathews AT genesis DOT tiac DOT net (Mark Mathews)
Subject: port borland to djgpp
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Wed, 12 Apr 1995 16:28:43 -0400 (EDT)

I' currently porting a Borland program called WADVIEW ( for DOOM) and I ran
into several Borland Functions that have no DJGPP equivalents. Can
somebody help me with the following:

Has anybody written these for DJGPP?
Should I write these for DJGPP?
 
 
Borland functions
 
 
getvect, and setvect              <DOS.H>
 
Get interrupt vector, set interrupt vector entry
 
Declaration:
 - void interrupt (*getvect(int interruptno))();
 - void setvect(int interruptno, void interrupt (*isr) ( ));
 - void interrupt(*_dos_getvect(unsigned interruptno)) ();
 - void _dos_setvect(unsigned interruptno, void interrupt (*isr) ());
 
 
 
poke, pokeb                       <DOS.H>
 
 - poke stores an integer value at the memory location segment:offset
 - pokeb stores a byte value at the memory location segment:offset
 
Declaration:
 - void poke(unsigned segment, unsigned offset, int value);
 - void pokeb(unsigned segment, unsigned offset, char value);
 
 
 
  FP_OFF, FP_SEG, and MK_FP macros        <DOS.H>
 
 - FP_OFF gets a far address offset
 - FP_SEG gets a far address segment
 - MK_FP makes a far pointer
 
Declaration:
 - unsigned FP_OFF(void far *p);
 - unsigned FP_SEG(void far *p);
 - void far *MK_FP(unsigned seg, unsigned ofs);
 
 
 
setmem                             <mem.H>
 
Assigns a value to a range of memory
 
Declaration:  void setmem(void *dest, unsigned length, char value);
 
 
 
ltoa, ultoa               <STDLIB.H>
 
 - ltoa converts a long to a string
 - ultoa converts an unsigned long to a string
 
Declaration:
 - char *ltoa(long value, char *string, int radix);
 - char *ultoa(unsigned long value, char *string, int radix);
 
 
getcurdir                          <DIR.H>
 
Gets current directory for specified drive.
 
Declaration:  int getcurdir(int drive, char *directory);
 
 
getftime, setftime                 <IO.H>
 
Gets or sets file date and time
 
Declaration:
 - int getftime(int handle, struct ftime *ftimep);
 - int setftime(int handle, struct ftime *ftimep);
 
 
filelength                         <IO.H>
 
 Gets file size in bytes
 
 Declaration:  long filelength(int handle);
 

Tkanks for any help 
 
Mark Mathews         mmathews AT genesis DOT nred DOT ma DOT us
 

- Raw text -


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