comp.lang.ada
 help / color / mirror / Atom feed
From: Petter Fryklund <petter.fryklund@atero.se>
Subject: Re: Least Dangerous Way to Do This ?
Date: Tue, 16 Oct 2018 22:16:17 -0700 (PDT)
Date: 2018-10-16T22:16:17-07:00	[thread overview]
Message-ID: <63bee5dc-51c0-4092-8e46-69e0301f1427@googlegroups.com> (raw)
In-Reply-To: <pq2toa$j4s$1@franka.jacob-sparre.dk>

> > Hi Everyone
> >
> > Okay, don't laugh(or laugh too hard)
> >
> > I need to interface with automatically generated C. function pointers are 
> > represented as a pointer to a pointer to a char. This is weird but done 
> > for pointer arithmetic purposes.
> 
> It's not certain (in the real world, at least) if a function pointer and an 
> object pointer have the same representation. We treat them as completely 
> different things in our code generator, because some weird machines (in 
> particular the U2200) have very large representations for function pointers 
> (one version was 8 36-bit words!). Similarly, on the 16-bit 8086 compilers, 
> function pointers carried a segment (thus a 32-bit address), and object 
> pointers usually didn't (thus a 16-bit address).
> 
> So if you want this code to work in different environments, I'd try to avoid 
> mixing the two (as Simon suggested).
> 
>                                                   Randy.

I don't think the U2200 is weird, it is or was actually a very nice machine. Unfortunately most of the Unisys Linköping people where kicked out before we could try Ada, but we where very interested in it then. I for a while maintained the local releases of COBOL before going in to performance analysis and cache-disk simulations.

Is there any U2200 out there? comp.sys.unisys talks a lot about virtual ones.

Regards,
Petter

  parent reply	other threads:[~2018-10-17  5:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-15 13:42 Least Dangerous Way to Do This ? patrick
2018-10-15 14:20 ` patrick
2018-10-15 14:51 ` Jacob Sparre Andersen
2018-10-15 16:05 ` Simon Wright
2018-10-15 19:28   ` patrick
2018-10-15 19:36     ` patrick
2018-10-16 16:07       ` Shark8
2018-10-17  0:09         ` patrick
2018-10-17 20:49           ` Shark8
2018-10-18 13:52             ` patrick
2018-10-15 20:36 ` Randy Brukardt
2018-10-16 22:32   ` patrick
2018-10-17  5:16   ` Petter Fryklund [this message]
2018-10-17 21:50     ` Randy Brukardt
2018-10-18  5:24       ` Petter Fryklund
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox