From Newsgroup: comp.lang.ada
Larry Kilgallen wrote in 1996: |--------------------------------------------------------------------------| |"In article <
3235E2C3.636F@itg-sepg.logicon.com>, David Shochat | |<
shochat@itg-sepg.logicon.com> writes: |
John Herro wrote: |
|
Of course, it's not obvious WHY you want to use two levels of | |indirection. |
|
It was necessary for 68K Mac programming (I don't know about PPC). The |
OS had to be able to move heap objects around whenever memory got tight,|
so the programmer would access most GUI objects through a so-called | "handle" which was a pointer to a "master" pointer to the actual data. |
In Meridian's Ada for the Mac, this was declared just as the examples in| this thread show (without the "all" -- it was Ada 83). This scheme was | crucial to allow the original Mac to run with only 128K. This scheme is | actually much older than the Mac. |
| |
|I would _hope_ that Macintosh Ada 95 implementations would make | |details of the handle mechanism _private_, since many mistakes | |one can make involve saving a copy of the middle pointer when | |the handle is not locked. |
| | |This is _exactly_ the sort of situation where higher level | |languages can help, and Ada has the syntax to do it. |
| | |Larry Kilgallen" | |--------------------------------------------------------------------------|
"@, Ada 202x, and Janus/Ada
January 4, 2017
by Randy Brukardt
[. . .]
[. . .] Given our initial focus on supporting very small host machines (initially, CP/M-80 machines with as little as 48K of memory [imagine
trying to run anything in that little memory today!]),"
says
HTTP://WWW.RRSoftware.com/html/blog/at-sign.html
John J Herro wrote: |----------------------------------------------------------------------------| |""Richard D Riehle" <
laoXhai@ix.netcom.com> wrote: |
I think it was in an early issue of Dr. Dobbs. |
| You're right. It was in the January, March, May, and July, 1983 issues| |of Dr. Dobbs Journal (issues 75, 77, 79, and 81). It was a *very* small | |subset of Ada - no types defined by the user (no records and no enumeration | |types!), no packages, and the non-standard spelling "elseif." However, it | |*was* a good demonstration of hiding; a variable in a subprogram would | |properly hide a variable of the same name in its parent. | | It compiled to an intermediate language similar to P-code, which it | |then interpreted. But strangely, the intermediate file had the extension | |.COM! Needless to say, if you typed that file's name without invoking the | |interpreter, you crashed the computer. | | Augusta was later translated into Pascal. I have source in both | |GWBasic and Turbo Pascal, in case there are any gluttons for punishment out | |there :-) | |- John Herro | |
http://members.aol.com/AdaTutor" | |----------------------------------------------------------------------------|
Fraser (at Blancolioni.org) wrote in 2000: |-------------------------------------------------------------------------| |"[. . .] |
| | |Personally, I've used Ada for compilers, natural language understanding, |
|an interactive fiction engine, a medieval computer war game, an editor, |
|an editor extension language, a parser generator, a database system, a | |large multiplayer game, a chip emulator, and a bunch of other stuff which|
|I can't remember just now. The closest I've come to embedded systems is | |targeting an Ada compiler to the Commodore 64. |
| | |cheers, | |Fraser." | |-------------------------------------------------------------------------|
Fraser Wilson wrote in 1999: |--------------------------------------------------------------------------| |"I nearly cried when
stt@averstar.com said: |
| | |>However, we have had good experience with making the | |>unit of variation be the whole source file. Typically | |>you can define a small number of primitive types and constants | |>which can isolate out the environment-specificity from all | |>other source files. Then you only need to select which | |>version of this one source file you will use to switch from | |>one environment to another. Our experience is that this approach | |>is dramatically more maintainable that spreading #ifdef's or | |>equivalent out all over the code. |
| | |Indeed. For various reasons, I maintain a small compiler that emits | |assembler for either a 32 bit virtual processor that executes editor | |extension commands, or an 8 bit 6502 (which means that I can finally | |use Ada on my Commodore 64 -- actually, a C64 emulator, but close | |enough). To switch between targets, I put all the system dependent | |stuff in subdirectories of the main source tree, and use compile | |time flags to tell gnatmake to select the appropriate one. Voila! | |It's safe, and it's hard to create obscure bugs this way. |
| | |This works unbelievably better that mucking around with a preprocessor. |
|I remember those days when I used a bunch of #error directives to try | |to find out why a particular file, the subject of a #include, wasn't | |being read, and the culprit was usually some sort of #define coupled | |with #ifdef stuff. Pure evil. Mind you, we were using Visual C++, | |so we were kind of doomed from the start I think. |
| | |On a side note, who wants to target GNAT to MMIX? There's some | |interesting features on the chip that are impossible (or very dodgy) | |to access from C, whereas Ada compilers can target them with ease. |
| | |cheers, | |Fraser. | |-- | |Fraser Wilson | 700 East Middlefield Rd | Phone: 650 943 5270 | |Sr R&D Engineer | Mountain View, CA 94043 | Fax: 650 934 1227 | |Synopsys Inc | USA | Email:
fraser@synopsys.com|
| Ada, Linux, PowerPC: The Golden Triangle" | |--------------------------------------------------------------------------|
Augusta "currently runs only on Z-80-based
CP/M systems."
says
HTTPS://Archive.org/details/1983-03-dr-dobbs-journal/page/20/mode/2up
Ada subset products for Commodore 64s by Data Becker (cf. Abacus Software)
are called "Ada: Der Trainingskurs zu Ada komplett mit einem
Subset-Compiler" (cf. Abacus Ada and "Abacus Ada Training Course"). Cf.
HTTPS://WWW.C64-Wiki.com/wiki/Portal:Applications/Wanted_Articles HTTPS://WWW.C64-Wiki.com/wiki/Abacus_Software HTTPS://WWW.C64-Wiki.com/wiki/Data_Becker
So implementations of languages which look like Ada 83 used to exist in
under 128KB e.g. 64KB or 48KB.
--- Synchronet 3.21a-Linux NewsLink 1.2