Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!bu.edu!transfer!lectroid!sw.stratus.com!nick From: nick@sw.stratus.com (Nicolas Tamburri) Newsgroups: comp.lang.forth Subject: Re: Align Message-ID: <6253@lectroid.sw.stratus.com> Date: 21 Jun 91 17:36:22 GMT References: <9106190432.AA02430@ucbvax.Berkeley.EDU> <6217@lectroid.sw.stratus.com> <1991Jun20.155046.4273@innovus.uucp> Sender: usenet@lectroid.sw.stratus.com Organization: Stratus Computer, Inc. Lines: 35 > rob@innovus.uucp (Rob Sciuk) writes: > The problem lies not with processors like the MC68000 family, > which allow byte aligment (as do Intel) but the MC88000 and other > RISC processors which REQUIRE word alignment (HP-PA, SPARC etc). As far as I know, the 68000/6801x processors will fault if you try to execute a word mode instruction with a byte address. However this "feature" was corrected in the 68020 and after processor although with a penalty in access time, (which is probably what you were thinking of.) I think my statement stands: Necessary alignment is nothing new. In any case: I guess I see how your method works, but I have a dissagreement with it philosophically. I don't mind CREATE aligning things behind my back, if it is clearly documented that way. I do mind ALLOT doing it however, since this is a more general purpose word. With your method, how do I create a structure that looks like this: [1 byte ( length )][15 bytes ( name )] 0 C, 15 ALLOT without alloting an extra byte before the name? What's the benefit of using C, instead of , in this case? I guess I would prefer to put the implict alignment inside words like "," "W," "L," etc, where it is obvious that if I use these to define a data structure, then I will know enough to use the correct mode to access the data. If I use ALLOT however, I am implying that I want to access the data in unspecified, possibly multiple ways. If I do want the 15 bytes aligned, I will align them manually, which ensures my awareness that the bytes are not packed tightly. In any case, the semantics are a matter of option. We all do things our way. My only problem with your method is if it restricts my ability to pack bytes. /nt nick@kyron.sw.stratus.com