Path: utzoo!attcan!uunet!cs.utexas.edu!helios!archone!byron From: byron@archone.tamu.edu (Byron Rakitzis) Newsgroups: comp.lang.c Subject: Re: a style question Message-ID: <9127@helios.TAMU.EDU> Date: 15 Oct 90 15:38:16 GMT References: <65263@lanl.gov> <1990Oct12.225501.15701@cbnewsm.att.com> Sender: usenet@helios.TAMU.EDU Distribution: na Organization: College of Architecture, Texas A&M University. Lines: 25 In article <1990Oct12.225501.15701@cbnewsm.att.com> lfd@cbnewsm.att.com (leland.f.derbenwick) writes: > >One of the main heritages of the PDP-11 is that most people use >the constructs "*p++" and "*--p" more often than "*++p" and "*p--"; >for char or int arguments, the first two could be compiled into a >single PDP-11 instruction, while the other two required an extra >instruction. (Of course, if C were really intended only as a >structured assembler, the two forms that didn't conform to the >instruction set would never have been included.) > > -- Speaking strictly for myself, > -- Lee Derbenwick, AT&T Bell Laboratories, Warren, NJ This is not true for the PDP-11 alone. Don't several architectures (notably the VAX) support predecrement and postincrement register addressing modes? Correct me if I'm wrong, but I thought the m68k was the same way. Of course, on a RISC, the post- form will fill the delay slot with the increment/decrement. This is equally true for incrementing and decrementing though. So perhaps we will be seeing more of "*p++" and "*p--"... --- Byron Rakitzis.