Category : C Source Code
Archive   : SMTC130.ZIP
Filename : GETCODE.DOC
NAME
get_code_adr -- get a function address
SYNOPSIS
void get_code_adr(function, segment, offset);
int *function; name of function
int *segment; destination of segment value
int *offset; destination of offset value
DESCRIPTION
This function is used to get the absolute segment and offset
values for the address of a function within a program.
It is useful for installing interrupt handlers and
interfacing to assembly language modules.
EXAMPLE
somefunc() {
}
main() {
int segment, offset;
getcode(&somefunc, &segment, &offset);
printf("Address is %x:%x\n", segment, offset);
}
This function is found in SMTCx.LIB for the Turbo-C Compiler
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/