Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site hao.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!hao!hull From: hull@hao.UUCP (Howard Hull) Newsgroups: net.micro.68k,net.micro.16k Subject: PDP11s vs the micros Message-ID: <1617@hao.UUCP> Date: Sun, 7-Jul-85 18:19:47 EDT Article-I.D.: hao.1617 Posted: Sun Jul 7 18:19:47 1985 Date-Received: Thu, 11-Jul-85 04:52:27 EDT Distribution: net Organization: High Altitude Obs./NCAR, Boulder CO Lines: 77 Xref: watmath net.micro.68k:993 net.micro.16k:347 This is one of those "promised summary" things. I asked how 68000 and 32016/32 users got along without a direct equivalent of the PDP 11's MOV (SP)+,@(R5)+ for table oriented video updates. I got three replies. 1.) Rich Altmaier, Integrated Office Systems He supplied actual NS32 code. I could not determine if this was only a single indirect (I think that is the case), or was in effect the same as the @(R5)+, in which R5 points to a location that contains what the processor will interpret as an *address* for the destination data word. This address is assumed to be part of a table of addresses of modifiable video fields in the PDP11 implementation. Method: Use movd with tos as the first operand, (r0) single indirect as the second operand. Surprise (to me anyway): tos evidently autoincrements! (Yuh couldn't tell that by a casual scan through the instruction set mnemonics. Awards to National for doing such a good job hiding it!) Nonetheless, it does require two additional instructions to increment the destination pointer in double precision. But since the address range of a typical PDP11 is so much smaller, only one would be needed for the NS chip to match equivalent performance. Convenient, but does take more bytes on the NS chip than the PDP11. 2.) Andrew Klossner He provided a method that would work well with a modularized data structure (it did not, as near as I could tell, use a double indirect form such as is implied in the @(R5)+ PDP11 instruction, either.) Method: Use a single MOVSD (move string) to copy the entire table. followed by an ADJSPx (adjust stack pointer) to pop the table off the stack. Moving data a word at a time is passe. 3.) Peter da Silva He provided some commentary on the virtues of the Motorola 6809 8-bit microprocessor in executing the "basic Forth loop", the little two- word chunk of list-linking magic which has caught the notice of all serious assembly language programmers of the last decade. Evidently the 6809 is the last of the micros of this particular mentality, grand as it may be. Peter indicated that the 6809 can manage the matter in two instructions, just as is found with the PDP11 execution. Peter noted that the execution of this famous task on the 68000 was indeed somewhat more awkward. Peter pointed out that the 68000 has a little less elegance with its instruction set than does the PDP11, but that it is rather more efficient in its use of T-states. Summary: It looks very much as though the influence of the profession of Computer Science has had a definite impact on the former priorities of hardware and software constraint. No longer is it considered the responsibility of the software designer to obtain maximum performance from a given hardware configuration (e.g. a particular microprocessor) but rather to obtain maximum economy of effort for the combination of hardware and software (i.e., cut costs and time from conception to market emplacement). Under the circumstances, most programmers will not worry about the detailed machine code at all, having most likely not looked any further than the high-level-language compiler output. Portability is more important than the cleverness of an implementation. This reflects the fact that while software producers always have to worry about competitors with more efficient implementations of their code, most such competitors will not survive late arrival at market, particularly with a more expensive product, or one that is more difficult to document or maintain. The method used to procure this new stance is to modularize tasks at many levels. In this case, such modularization is accomplished by breaking the video map into several parts such that updating is accomplished on one module at a time, rather than on the entire data structure as segmented by a suitable table of addresses. The double indirect, a concept always difficult to teach to the neophites, is now declared dead. For all practical purposes, it has been buried in the nested-line formats of structured programming topology. Howard Hull [If yet unproven concepts are outlawed in the range of discussion... ...Then only the deranged will discuss yet unproven concepts] {ucbvax!hplabs | allegra!nbires | harpo!seismo } !hao!hull