Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!BREEBAAR%HLERUL5.BITNET@wiscvm.wisc.EDU From: BREEBAAR%HLERUL5.BITNET@wiscvm.wisc.EDU Newsgroups: comp.lang.c Subject: Re: Absolute addressing in Turbo-C Message-ID: <9140@brl-adm.ARPA> Date: Thu, 3-Sep-87 06:16:22 EDT Article-I.D.: brl-adm.9140 Posted: Thu Sep 3 06:16:22 1987 Date-Received: Sat, 5-Sep-87 10:08:42 EDT Sender: news@brl-adm.ARPA Lines: 30 My sincere thanks to all the kind people who took time to answer my question about absolute adressing in Turbo-C. For those interested, the -for me- handiest way to say Turbo Pascal's VAR outHead : BYTE ABOLUTE $C000:$C300; in C is: #define outHead ( *(unsigned char far *)0xC000C300L ) Of course I had not realized at first that 'BYTE' should be translated as 'unsigned char', instead of just 'char', to get the range 0..255; and it took me half an hour to discover this. Well, I *said* I was no expert. But I feel somewhat comforted when I realize that of the thirteen people who responded, only *one* pointed it out. I also have another question. It's probably a very old one, but please bear in mind that I have no local C-gurus to consult, and that reference books never seem to say anything definite about the subject (at least the ones I've read, don't, and I just *can't* afford K&R; why is that book so horribly expensive?). It's this: Just WHY is it in C 'better' to write: *(a+n) instead of: a[n], where 'a' is an array of something? And how much 'better' is it? I remember reading on this list some time back that this does not extend to arrays of more than one dimension. Why? Just because the expressions will get too complex? Hope you will help me with this too. Leo Breebaart (BREEBAAR@HLERUL5.BITNET) Univ. of Leiden The Netherlands