How can I create with Borland C++ com files that don't have calls to DOS functions?
Thank you!
Borland C++ question
RE:Borland C++ question
>On 2002-03-27 06:16:59, Stefan wrote:
>How can I create with Borland C++ com files that don't have calls to DOS functions?
>Thank you!
Uhm... just don't use dos functions lol
Actually, in essence, you can't use any functions
provided to you... ie, any libc functions. Some
of them will probably not use dos ints (such as
the string functions) but without the source,
you can't be 100% sure, so I'd avoid them
entirely (you're going to have to rewrite them
anyway, so...).
If you do want to know which functions do or do not
use dos you'll have to compile an example and load
it into debug and look for any calls to interrupts,
specifically 21h, but you'll also want to look
out for bios ints as well 13h, 10h, etc.
Actually, as a general rule, if it uses ints,
you probably can't use it.
jeff
>How can I create with Borland C++ com files that don't have calls to DOS functions?
>Thank you!
Uhm... just don't use dos functions lol
Actually, in essence, you can't use any functions
provided to you... ie, any libc functions. Some
of them will probably not use dos ints (such as
the string functions) but without the source,
you can't be 100% sure, so I'd avoid them
entirely (you're going to have to rewrite them
anyway, so...).
If you do want to know which functions do or do not
use dos you'll have to compile an example and load
it into debug and look for any calls to interrupts,
specifically 21h, but you'll also want to look
out for bios ints as well 13h, 10h, etc.
Actually, as a general rule, if it uses ints,
you probably can't use it.
jeff
RE:Borland C++ question
I'm confused ... when I say to BC not to use it's standard library it's ok, but ... when I debug there appears that stupied int 21h, wich I don't whant.
I'm searching for and 16bit compiler wich can make plain binary ... BC is o good compiler but it makes use, allways, of DOS functions!
Can anybody tell me what to do? I need a 16bit compiler wich makes clean plain binary (without DOS functions)
Thanks!
I'm searching for and 16bit compiler wich can make plain binary ... BC is o good compiler but it makes use, allways, of DOS functions!
Can anybody tell me what to do? I need a 16bit compiler wich makes clean plain binary (without DOS functions)
Thanks!
RE:Borland C++ question
>On 2002-03-29 03:20:31, Anonymous wrote:
>I'm confused ... when I say to BC not to use it's standard library it's ok, but ... when I debug there appears that stupied int 21h, wich I don't whant.
>I'm searching for and 16bit compiler wich can make plain binary ... BC is o good compiler but it makes use, allways, of DOS functions!
Really? That's pretty annoying, I would imagine. Are
Are you sure there's no other switch that might cause
BCC to ignore dos interrupts? I'm not familiar
with BCC anymore, unfortunately... but I was pretty
sure people had used it for boot loader code...
>Can anybody tell me what to do? I need a 16bit compiler wich makes clean plain binary (without DOS functions)
LCC might produce 16-bit code... I can't remember.
MicroC was free at one point, I believe, but now
has a $25 (or something like that) cost... you
might still be able to get the previous free version,
however.
There was a book called "How to write your own
32-bit operating system" (I believe that's the right
title) which had source to a C compiler (it used
pascal calling conventions, but that's pretty
easy to change). You might be able to find it
on the 'net (it also had an assembler called DASM)
Jeff
>I'm confused ... when I say to BC not to use it's standard library it's ok, but ... when I debug there appears that stupied int 21h, wich I don't whant.
>I'm searching for and 16bit compiler wich can make plain binary ... BC is o good compiler but it makes use, allways, of DOS functions!
Really? That's pretty annoying, I would imagine. Are
Are you sure there's no other switch that might cause
BCC to ignore dos interrupts? I'm not familiar
with BCC anymore, unfortunately... but I was pretty
sure people had used it for boot loader code...
>Can anybody tell me what to do? I need a 16bit compiler wich makes clean plain binary (without DOS functions)
LCC might produce 16-bit code... I can't remember.
MicroC was free at one point, I believe, but now
has a $25 (or something like that) cost... you
might still be able to get the previous free version,
however.
There was a book called "How to write your own
32-bit operating system" (I believe that's the right
title) which had source to a C compiler (it used
pascal calling conventions, but that's pretty
easy to change). You might be able to find it
on the 'net (it also had an assembler called DASM)
Jeff