From: utzoo!decvax!ucbvax!info-vax Newsgroups: fa.info-vax Title: Re: Information on Unix/Vax peculiarities Article-I.D.: ucbvax.217 Posted: Sat Dec 4 16:27:35 1982 Received: Sun Dec 5 09:17:27 1982 >From mark.umcp-cs@UDel-Relay Sat Dec 4 16:07:34 1982 Mail-From: ARPANET host UDEL-RELAY rcvd at 28-Nov-82 0809-PST To: Charles F Von Rospach , unix-wizards@Sri-Csl Cc: Info-vax@Sri-Csl Via: UMCP-CS; 27 Nov 82 20:36-EST Remailed-Date: 4 Dec 1982 1047-PST Remailed-From: the tty of Geoffrey S. Goodfellow Remailed-To: Info-VAX@SRI-CSL: ; I have a program which seems to have been written for the PDP11. In bringing it up on the Vax, I have been getting funny results. It seems that whoever wrote the program is doing some funny things in a large integer array, reading and writing into it with a character pointer. Since I assume the program did work (its problems are much too obvious to have let through), I am assuming that there is some problem with how the thing handles internal storage. It seems as though it is assuming that an integer is 16bits, stored in two bytes in a low/high byte setup. IF I remember my PDP11, that is how it stores things. I am rather new to that Vax, but I believe it stores things high/low. I am right now wondering if there are any other time bombs out there that I (and the rest of the net) need to be aware of. The Vax and the Pdp-11 both use the same byte addresses/packing scheme in words (which, by the way, actually makes a lot of sense). The problem with your program is very likely just that 'int' to Vax C means 32 bits, but to pdp-11 C means '16' bits. Try declaring the integer array to be 'short int'.