Article View: comp.sys.cdc
Article #12Re: CDC nostalgia; too many addressing modes
From: Ray Spalding
Date: Tue, 03 Apr 1990 17:24
Date: Tue, 03 Apr 1990 17:24
37 lines
2430 bytes
2430 bytes
In article <188@csinc.UUCP> rpeglar@csinc.UUCP (Rob Peglar) writes:
>In article <7562@hydra.gatech.EDU>, cc100aa@prism.gatech.EDU (Ray Spalding) writes:
>>
>> + SA1 A1+B1
>> BX6 X1-X0
>> NZ X6,*
>
>This sure is classic. For those of you paying attention, notice two things:
>1. The '+' sign to force word alignment in COMPASS.
>2. The possibility of a mode-out on this code segment.
> * If CM doesn't contain (X0) from (A1+B1) until FL, you're hosed.
> This loop depends on a word matching the contents of X0 to
> terminate. A classic, alright - classic bad COMPASS.
I left the setup and boundary conditions as an exercise for the
reader. The code appears in the routine "EQS - Equality Search Table"
in COMCMTM by Greg Mansfield (the software equivalent of Seymour?).
The trick is that managed tables are always one word longer than needed
to hold the data. On entry to EQS, what you're searching for is stored
in that extra word at the end, guaranteeing you'll find it there if not
somewhere in the data first. When the loop terminates, you check the
address of the found data versus the address of the end of the data + 1
(a good place for that old Aj-Bk "mode"). I believe this technique is
described in Knuth's "Searching and Sorting" volume. (I'm packed up to
move or I'd look it up).
As someone quite properly pointed out, the loop finds the ones
complement of the target also, and is therefore not completely
general. But, when you know something about the data (e.g., all > 0,
or all ending in a number of zero bits, or all beginning with an
alphabetic), it's difficult for Greg and myself to resist it.
--
Ray Spalding, Office of Computing Services
Georgia Institute of Technology, Atlanta Georgia, 30332-0275
uucp: ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!cc100aa
Internet: cc100aa@prism.gatech.edu
Technical Details
Message-ID:
<7640@hydra.gatech.EDU>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!dali!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!hubcap!mephisto!prism!cc100aaReferences:
<1990Mar29.164944.19446@msuinfo.cl.msu.edu> <7562@hydra.gatech.EDU> <188@csinc.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!dali!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!hubcap!mephisto!prism!cc100aa From: cc100aa@prism.gatech.EDU (Ray Spalding) Newsgroups: comp.sys.cdc Subject: Re: CDC nostalgia; too many addressing modes Message-ID: <7640@hydra.gatech.EDU> Date: 3 Apr 90 17:24:30 GMT References: <1990Mar29.164944.19446@msuinfo.cl.msu.edu> <7562@hydra.gatech.EDU> <188@csinc.UUCP> Reply-To: cc100aa@prism.gatech.EDU (Ray Spalding) Organization: Georgia Institute of Technology Lines: 37