Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!naitc!ddsw1!hb From: hb@ddsw1.MCS.COM (Henry Barta) Newsgroups: comp.sys.intel Subject: Re: iC86 absolute mapping of vars Message-ID: <1990Sep14.023548.19241@ddsw1.MCS.COM> Date: 14 Sep 90 02:35:48 GMT References: <9779@discus.technion.ac.il> Reply-To: hb@ddsw1.MCS.COM (Henry Barta) Organization: ddsw1.MCS.COM Contributor, Wheeling, IL Lines: 17 In article <9779@discus.technion.ac.il> dario%techunix.bitnet@lilac.berkeley.edu (Dario Ringach) writes: > >Does anyone know how to place an iC86 variable at a specific >absolute address? Thanks. I don't know of any way to do this through the compiler. When I had to address memory mapped I/O in an embedded system, I declared the variable as 'extern' in the '.c' file. To locate it, I created an '.asm' file that listed the same variable name as an 'EXTRN' and then located it within a segment using an 'ORG' statement. The segment was then placed at the proper location when the program was located ('XLOC86') following linking ('XLINK86'). If you are targetting DOS or iRMX you may succeed by declaring a pointer to the memory location you wish to access and then dereference it. iC86 has functiona that can be used to assign an address to the pointer. hank