🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #13031

Re: catering to bad code

#13031
From: jans
Date: Fri, 20 Feb 1987 16:03
31 lines
2357 bytes
In article <436@cpocd2.UUCP> howard@cpocd2.UUCP (Howard A. Landman) writes:

>It's not just location 0.  It's all small integers, positive and
>negative...  On a machine without read access to page 0 this bug
>would have caused a simple core dump...  It is safer to make page *0
>*and* page -1 both inaccessible... perhaps even all the pages
>addressable by shorts...  Use of location 0 is a bug.

Hold on one second, there.  Let's not make those with a legitimate use
of low memory pointers pay for such things!  Such idiocy would mean
that certain machines, such as the NS32000, would lose the speed
advantage of "base page addressing", or whatever you want to call it.
Good National assembly coders typically keep their SB register at 0x40
for best code density and speed in memory indirection.  Such code often
requires C interface code to talk through such pointers.

Another NS32000 application I did was a Z80 simulator.  The Z80 code
was loaded directly in the first 64k so that z80 pointers could be used
directly.  While the opcode simulator was assembly, BIOS routines were
all written in C, and (as any CP/M programmer knows) location zero must
be accessed.

This is kind of far from the original subject, and I agree that the
bad code should be cleaned up.  C is a wonderful vehicle for accessing
machine resources -- don't cripple it just because some people are
incapable of using those resources correctly!  Find the jokers and make
them use Ada instead!

:::::: Artificial   Intelligence   Machines   ---   Smalltalk   Project ::::::
:::::: Jan Steinman		Box 1000, MS 60-405	(w)503/685-2956 ::::::
:::::: tektronix!tekecs!jans	Wilsonville, OR 97070	(h)503/657-7703 ::::::
Technical Details
Message-ID: <8193@tekecs.TEK.COM>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!ames!ucbcad!ucbvax!decvax!tektronix!orca!tekecs!stalker!jans
References: <14833@amdcad.UUCP> <14837@amdcad.UUCP> <436@cpocd2.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!ames!ucbcad!ucbvax!decvax!tektronix!orca!tekecs!stalker!jans
From: jans@stalker.UUCP
Newsgroups: comp.arch
Subject: Re: catering to bad code
Message-ID: <8193@tekecs.TEK.COM>
Date: Fri, 20-Feb-87 11:03:49 EST
Article-I.D.: tekecs.8193
Posted: Fri Feb 20 11:03:49 1987
Date-Received: Sat, 21-Feb-87 16:22:29 EST
References: <14833@amdcad.UUCP> <14837@amdcad.UUCP> <436@cpocd2.UUCP>
Sender: nobody@tekecs.TEK.COM
Reply-To: jans@stalker.UUCP (Jan Steinman)
Distribution: world
Organization: Tektronix, Inc., Wilsonville, OR
Lines: 31