🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #1245

Re: "Divide error" with TC 2.0 program

#1245
From: czmurek
Date: Fri, 15 Dec 1989 13:43
32 lines
1942 bytes
In article <2244@sactoh0.UUCP>, brent@sactoh0.UUCP (Brent K. Barrett) writes:
>  I'm working on a TC 2.0 project, and something very frustrating
> has come up.  I have a function, send(), that sends formatted
> output to the screen via DMA or BIOS calls (internal variable).
> Whenever I use a floating point format in my calls to send(), I get
> a "Divide error" and a crash to the DOS prompt.
>  
>  Here's send():
>  
>  I get no compiler/linker errors or warnings when compiling my
> program (which I can not include for both size and security
> reasons).  I'm using compact model, but have tried all other models
> (that will hold the data) without change.  If I comment out the
> first call to send() that uses the %f format, it will crash on the
> next, and so forth.  I have linked mathc and emu, so that's not the
> problem.
>  
>  I'm very frustrated and have lost about 4 days work over this
> problem, so I really hope someone out there can at least tell me
> *why* the "Divide error" happens.  Just that would probably be
> enough to kick my brain into gear again and figure this thing out.
>  

Brent:
	I think it would help alot if you were to fully explain 
yourself.  I understand that there are security considerations here, 
but could you at least tell us whether you are casting this float into 
one of the int arguments or whether it is coming in via the variable 
argument list?  Please E-mail to me direct and I will help you with 
this problem.  It will be a simple modification I am sure.

-Chris
Technical Details
Message-ID: <26525.2588f4e5@drunivac.uucp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!mailrus!rutgers!njin!alpha!gamma!czmurek
References: <2244@sactoh0.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!mailrus!rutgers!njin!alpha!gamma!czmurek
From: czmurek@drunivac.uucp
Newsgroups: alt.msdos.programmer,comp.lang.c,comp.sys.ibm.pc
Subject: Re: "Divide error" with TC 2.0 program
Message-ID: <26525.2588f4e5@drunivac.uucp>
Date: 15 Dec 89 13:43:01 GMT
References: <2244@sactoh0.UUCP>
Lines: 32