🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7979

Re: Need help in TSR (80x86 asm) calling C

#7979
From: pixel
Date: Thu, 25 Apr 1996 00:00
16 lines
1503 bytes
While prying the lemmings from hir ankles 23 Apr 1996 20:45:30 GMT,
myao@mailhost.ecn.uoknor.edu (Minghua Yao) wrote:

>I have a C module which uses "fopen()" to open a file. When called by a
> C main(), the module works well and the file can be opened. But if this
> module is called by a TSR code (which is loaded at an interrupt not used
> by the DOS, and is executed by activating this interrupt), the file which does
> exist cannot be opened often times. Sometimes (seldom,though) the file
> can be opened. If so, the machine will die. The behavior seems to be
> undefinte.

Could you be running afoul of the InDos problem?  Sometimes in a TSR
it's not safe to use some int 21h functions; if fopen() uses int 21h
you could sometimes run into problems.  Others here will be able to
say with better certainty how likely this is and suggest workarounds
if this is your problem.
Technical Details
Message-ID: <3180105d.1155105@news.shore.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <4ljfha$s8s@independence.ecn.uoknor.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10f6aa,c9a50b8babe96bc5
X-Google-Attributes: gid10f6aa,public
X-Google-Thread: 10d683,c9a50b8babe96bc5
X-Google-Attributes: gid10d683,public
X-Google-Thread: f7d8d,c9a50b8babe96bc5
X-Google-Attributes: gidf7d8d,public
From: pixel@shore.net
Subject: Re: Need help in TSR (80x86 asm) calling C
Date: 1996/04/25
Message-ID: <3180105d.1155105@news.shore.net>
X-Deja-AN: 151460802
references: <4ljfha$s8s@independence.ecn.uoknor.edu>
organization: IllLogics Unlimited
newsgroups: comp.os.msdos.programmer,alt.lang.asm,aus.computers.ibm-pc