Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 SMI; site sun.uucp Path: utzoo!watmath!clyde!floyd!harpo!decvax!decwrl!sun!gnu From: gnu@sun.uucp (John Gilmore) Newsgroups: net.lang.c Subject: Re: help! (much shorter) Message-ID: <665@sun.uucp> Date: Wed, 21-Mar-84 04:58:36 EST Article-I.D.: sun.665 Posted: Wed Mar 21 04:58:36 1984 Date-Received: Thu, 22-Mar-84 01:28:53 EST References: <195@pyuxvv.UUCP> Organization: Sun Microsystems, Inc. Lines: 17 You can't assign an absolute address to a piece of text or data that comes out of the C compiler. You can make an absolute address look like a struct (or other variable), then do a structure assignment at runtime to initialize it if you want. For example: #define DISKCTLR (*(struct diskregs *)0xFFF304) struct diskregs diskinit = {...}; DISKCTLR = diskinit; DISKCTLR.command = DISK_RESET; ... Note that in the structure assignment, you can't control the ordering of the storage references, so if it's an I/O device (not real memory), you're probably better off doing it by hand. Most devices are finicky about what registers you write in what order anyway.