Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!nosc!ucsd!ames!haven!uflorida!mailrus!tut.cis.ohio-state.edu!osupyr.mast.ohio-state.edu!vkr From: vkr@osupyr.mast.ohio-state.edu (Vidhyanath K. Rao) Newsgroups: comp.lang.c Subject: Re: "Numerical Recipes in C" is nonportable code Summary: I am totally confused Message-ID: <867@osupyr.mast.ohio-state.edu> Date: 2 Sep 88 18:48:12 GMT References: <664@lindy.Stanford.EDU> <6758@megaron.arizona.edu> <718@gtx.com> <8395@smoke.ARPA> Organization: Ohio State Math-Stats Dept Lines: 19 In article <8395@smoke.ARPA>, gwyn@smoke.ARPA (Doug Gwyn ) writes: > [From way past] Such an implementation will ABORT ON THE COMPUTATION `b - 1', > That is not an X3J11 invention, just an acknowledgement of the > way the world is. (For example, segmented architectures.) But why should it abort? If the address is sr:0, (sr = segment register) subtract 1 to get (sr-1):ffff [or whatever number of 'f's]. Memory protection, it seems to me, should not notice attempts to compute addresses but only attempts to access forbidden addresses. Of course, this approach levies heavy penalities on segmented architecutres. If you are using the 'small' model (in the 8088 meaning of the word), sr:0 - 1 = sr:ffff. Now you got to worry about the model. But doesn't the philosophy of C say 'programmer knows best'. If you want to diddle with segmented architectures, you got to put up with headaches. So what am I missing? -Nath vkr@osupyr.mast.ohio-state.edu