View Single Post
Old 14 May 2021, 15:15   #12
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,248
There are a couple of unofficial documentations about the GV and its contents -thrust only half it what you read there. In 1.3, there were some useful functions in there, like WriteF for formatted printing, a co-routine switcher and ReadArgs() which is really a miss in 1.3. However, compared to 2.0, there is nothing else in there you need, and believe me, it looks much less impressive from the inside than from the outside. What this command line startup code does is that it performs the "runtime linking" of the binary as BCPL code is not "statically linked". It takes the system segments from the dos.library (mlib, blib) and the CLI globals (the struct CommandLineInterface), and then parses the binaries itself by the BCPL runtime linkage structure to build the GV of the program, then launches it through the start() vector at offset +4. But, again, this is arcane magic you shouldn't really bother about. The only place for that magic are "BCPL linkage" handlers (i.e. those with GlobVec = 0 in the mount entry). FFS, the Port Handler and the console (CON: handler) are for "hysterical raisons", but they are all written in assembler or C and rather emulate this startup process. They have been long replaced by non-BCPL code. The last remaining BCPL dinosaur with native GlobVec=0 linkage was the AUX-Handler in 3.1, but it got finally extinct in 3.1.4 and was replaced by a C version. Finally, 3.2. will get rid of it completely and replace it by a small stub, the work now being done by the console all over.
Thomas Richter is offline  
 
Page generated in 0.04697 seconds with 11 queries