Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site gitpyr.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!ittvax!dcdwest!sdcsvax!akgua!gatech!gitpyr!robert From: robert@gitpyr.UUCP (Robert Viduya) Newsgroups: net.lang.c Subject: Re: derived types Message-ID: <37@gitpyr.UUCP> Date: Sat, 19-Jan-85 19:00:02 EST Article-I.D.: gitpyr.37 Posted: Sat Jan 19 19:00:02 1985 Date-Received: Tue, 22-Jan-85 06:27:06 EST References: <7479@brl-tgr.ARPA> Organization: Georgia Tech, Atlanta Lines: 45 >< > weird machines such as u1108 (b=9, w=18, l=36, q=72) and cdc6400 (b=6?, > w=15, l=30, q=60) would have to adapt as best they can (they kinda have > to now anyway). > Actually, the CDC 6400 series, as well their 170 series, has 18 bit addresses, which mean pointers have to be at least that much. Also, addressing is done only on 60-bit words. All arithmetic operations are done with 60-bits per operand, minimum (except for addressing arithmetic). The native character set is a 6-bit one, which means 10 characters per word. Accessing one character means loading a word and doing shifts and ands. In adapting C to that architecture, it would be more time efficient to store one character per word, however, storage would be drastically wasted (when you've only got an 18-bit address space, storage can be at a premium (the architecture doesn't support virtual memory)). NOS, one of the operating systems available for the 170 series, supports an 8-in-12 bit character set where each character is represented as the lower 8-bits in a 12-bit cell (in true ASCII). If I were to adapt C to the 170 series, I would set the following types: int 60-bits long int 60-bits short int 30-bits (2 per word) pointer 30-bits (2 per word, upper 12 bits used for indexing into words) char 12-bits (5 per word, strings aligned on word boundarys) float 60-bits double 60-bits Obviously, there'll be a lot of wasted time when scanning a string, but proper register management can minimize that (there are enough registers to hold everything). Short ints should be used only to save storage and nothing else. robert -- Robert Viduya Office of Computing Services Georgia Institute of Technology, Atlanta GA 30332 Phone: (404) 894-4669 ...!{akgua,allegra,amd,hplabs,ihnp4,masscomp,ut-ngp}!gatech!gitpyr!robert ...!{rlgvax,sb1,uf-cgrl,unmvax,ut-sally}!gatech!gitpyr!robert