On Sun, 28 Apr 2002 21:48:15 GMT, James Ross strongly typed: >...Therefore it >should be possible to compile a program in Ada such as: >--- >with System; use System; >with System.Storage_Elements; use System.Storage_Elements; >procedure Hello is > Char : Character; > for Char'Address use To_Address (16#B8000#); >begin > Char := 'H'; >end Hello; >--- >This makes no use of any OS call nor does it use any dynamic memory. [Coughs] Well I do not know how GNAT works internally, but I do know that any 'normal' Ada program, even a 'tiny' one such as above, compiled with (as far as the compiler is concerned) the intention of being executed in a 'full OS' environment, could be compiled with all manner of calls to the OS, for all sorts of things. >It should be possible to type a few magical switches on the command >line and end up with a binary image file that includes all the code >that the above needs to execute starting from byte position 0 of the >file. And not include anything it doesn't need. (I am specifically >referring to GNAT for Windows, but if it is only possible to do under >GNAT for Linux I would not mind seeing it) > >But I can not figure out HOW to do this! I'm afraid this might be a bit much to ask for (but I'm not sure). >Actually the other thing I need is a crash course in 32bit >segmentation, descriptors, protected mode, etc � from the ground up. >A 101 in Intel OS design as Intel meant it to be on their processors >if you will. The problem is this is a steep learning curve on it's >own without adding all the other obstacles plus learning high level OS >design, all the while using a language that I am not quite up to speed >on yet! Wew� that's a bad mix! :) A good starting point is to go to: http://developer.intel.com/design/pentium/manuals/ and download the manuals. They are reasonably well written and authoritative. Remember when reading these that often, with chip features these days, the question is not "How do I use this feature?" but rather "Do I need to use this feature?". If the OS 'as Intel meant it to be' had come into existence, it would have been on a chipset called 432, and there would have been no 80386 and its successors. Sadly, of course, it didn't happen that way. But guess which language it would have been programmed in? Yes, really. -- Nick Roberts