Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!columbia!rutgers!lll-lcc!ptsfa!ihnp4!gargoyle!vijit!madsen From: madsen@vijit.UUCP (Dave Madsen) Newsgroups: comp.lang.c,comp.arch Subject: Re: Was the 360 badly-designed? (was Re: Compatibility with EBCDIC) Message-ID: <110@vijit.UUCP> Date: Mon, 24-Aug-87 22:01:05 EDT Article-I.D.: vijit.110 Posted: Mon Aug 24 22:01:05 1987 Date-Received: Wed, 26-Aug-87 04:53:02 EDT References: <855@tjalk.cs.vu.nl> <2683@hoptoad.uucp> <916@haddock.ISC.COM> <1590@apple.UUCP> Organization: Wang Labs, Oakbrook, IL Lines: 84 Summary: 360 design / Edit insn Xref: mnetor comp.lang.c:3890 comp.arch:1916 ----- Sorry about the length, see last paragraph ------ In article <1590@apple.UUCP>, bcase@apple.UUCP (Brian Case) writes: > In article <1589@apple.UUCP>, bcase@apple.UUCP (Brian Case) writes: > > >No stack, small segments, nonstandard character set with holes. > > Wait, is the character set part of the architecture!?!? I didn't think so, > But, I was wrong: I forgot about the character instructions (edit, etc.). > These make assumptions about the character set, don't they? > bcase 1) The holey character set issue is dead; see many earlier messages in this continuing saga. 2) The ED and EDMK instructions don't make assumptions about the character set, they specify edit mask characters and editing actions. Since these characters are replaced during the editing process, they obviously can't be in the final string, and so shouldn't be normally used "printable" chars. Ie, if "A" WOULD have been defined as an editing character, you would not have any "A"s in the final edited string, as they would have been replaced by digits. SO the designers made the editing characters low in the collating sequence, where there aren't any "printables". 3) The packed instructions are optimized for EBCDIC, and for dealing with overpunched signs in numeric fields. However, the sign zone rules are lax to the extent that if it ain't a 0xD, it's positive. (I seem to remember that there's a non-preferred negative zone, but I can't remember... 0xB?). For the machine I work on (whose peripherals "know" ASCII), that's a pain. But my machine mfr (Wang) has taken the UNPK insn and made it make '3' zones instead of 'F' zones. 4) About segments: NO NO NO NO NO. You have the wrong idea. I program daily in assembler on a Wang Labs VS 100 (which has taken 370 architecture and insn set and added stack, indirect call, and instruction-counter relative instructions), and it has NEVER EVER occurred to me to think of 4K OFFSETS as defining 'segments'. The 370 architecture defines a LINEAR address space. The target address (for one common instruction format) is computed by adding 2 registers and an offset. ANY register (except 0) may be used in this computation, not just some 'segment' register. Registers are general-purpose. No special registers, even for 'address' and 'data', let alone 'segments'. The 4k is not much of a limitation, as the coding style for the machine does not depend on a relatively fixed value in a register. To be more concrete, suppose I have a large array of structure. A register would typically be used to resolve to the array element, and any offset would address into the structure. Not many structures have over 4k worth of data. If you have data longer than that, you can always use another register, so that the 2nd register points to 4k past the first. Then you have 8k. The *whole idea* is that address manipulation in registers is easy, convenient, and natural (Please no flames on what natural is. Some would say that pre/post increment is natural, and for some machine architectures, they're right. Same idea here). I VERY SELDOM run into a program that has to use more than one register at a time to get more than 4k addressability for either code or data. Reenterability is easy. Subroutine calls (via BAL or BALR) usually result in the subroutine using a new 'base' register and saving the old one in a stack or linked list. The code is such that you usually don't see routines over 4k in length. Even for data addressability you usually don't find over 4k. Directly addressed items are put in the first 4k and other items (like data management control blocks, for example) are put later. The structure of the calls to the OS sometimes make it natural to put a pointer to that control block in the first 4k and use that. Suffice to say, I know that as a consciencious programmer, I feel guilty when I have to use more than one base register: It's simply poor technique, and it's NOT confining to use only one. Please no flames from those who work on special-purpose machines; this architecture was designed for general-purpose work, primarily business. I would be more than happy to converse AT LENGTH with any who would call me (312) 954 6512 or e-mail about this. Summaries (as if this hasn't been beaten to death already) could be posted if there's an idle newsgroup day. (Maybe in talk.bizarre) :-) Finally, I wish to apologize 1) for this message length, and 2) for having it in this newsgroup. I simply find that having been familiar with this architecture for 19 years, I have a lot to say to those who make postings who are less informed about or experienced with the architecture. Dave Madsen ---dcm ihnp4!vijit!madsen or vijit!madsen@gargoyle.uchicago.edu I sure can't help what my employer says; they never ask me first!