Path: utzoo!attcan!uunet!sco!seanf From: seanf@sco.COM (Sean Fagan) Newsgroups: comp.arch Subject: Re: RISC v. CISC --more misconceptions Message-ID: <1622@scolex> Date: 2 Nov 88 05:32:21 GMT References: <156@gloom.UUCP> <18931@apple.Apple.COM> <40@sopwith.UUCP> <998@l.cc.purdue.edu> Reply-To: seanf@sco.COM (Sean Fagan) Organization: The Santa Cruz Operation, Inc. Lines: 42 In article <998@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes: >Maybe we should have a "competition" to see how many operations >we can come up with for which silicon can do a quick, efficient, accurate job, >but which are clumsy and expensive in software. > Find the distance to the next one in a bit stream FAST. It would >be good to have an exception handler if one is not found. I am considering >algorithms not worth implementing if the operation is slow. > Divide an integer by an integer, obtaining a quotient and a remainder, >the choice of remainder depending on the signs of the dividend and the divisor. > Divide a floating point number by a floating point number, obtaining >an integer quotient and a floating point remainder. It would be nice to have >the choice of remainder depending on the signs here also. Quick background: Cyber 170's have 24 regsiters: A, B, and X, eight of each (0-7). A and B registers are 18 bits wide, and are, generally, used for address variables. X registers are 60-bits wide, and are usually used for computation. To load a value into X, you load the address into A, where n=[1,5]. To store a value from X, you load the address into A, where n=[6,7]. A0 has no special values, and B0 is a hardwired 0. Ok, a few from the Wonderful World of the Cyber: Count the set bits in a word (register or memory, it doesn't matter). Very useful for some trivial applications (such as playing Othello), but I haven't seen much else done with it. It was put in, it looks like, because the hardware was already there (in the form of parity checking), but I could be wrong. Given the, um, interesting setup described above, write a routine to save all of the registers into memory (hint: use shifts). It ain't easy, and I don't remember how to do it, so don't mail me 8-). It is, however, trivial to do in hardware. Who else has some fun examples? >Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907 -- Sean Eric Fagan | "Engineering without management is *ART*" seanf@sco.UUCP | Jeff Johnson (jeffj@sco) (408) 458-1422 | Any opinions expressed are my own, not my employers'.