[Coco] OS9 vs MS Win

L. Curtis Boyle curtisboyle at sasktel.net
Thu Feb 27 07:40:41 EST 2014


Actually, there were subroutine modules (at least in level 2)... I wrote a machine language module for some special functionality for Printronix P300 printers that we called from BASIC09 programs all the time. From what little I remember, you had access to the calling programs data area (in this case, BASIC-09 or RUNB), and you could do local storage with the stack (which I used in this case).

Sent from my iPhone

> On Feb 27, 2014, at 6:24 AM, Allen Huffman <alsplace at pobox.com> wrote:
> 
>> On Feb 27, 2014, at 4:23 AM, Johann Klasek <johann+coco at klasek.at> wrote:
>> 
>> 
>> An additional aspect (memory saving) gives dynamic libraries, which are
>> not present in OS-9 (at least in level I), known as DLLs in Windows or
>> shared objects/libraries (.so files) on Unix.
>> 
>> My collegue invented a shared library environment for OS-9 level I decades
>> ago to fullfill his needs for implementing a large commercial solution
>> even on Level I).
>> If someone is interested in details I'll provide it. ;)
> 
> After 6809, OS-9 got two official types of shared libraries: Trap Libraries, and Subroutine Modules.
> 
> Subroutine Modules were likely similar to what your colleague came up with. Basically, a DATA module with code and an offset table at the start so you could F$Link to the module to get it's address, and then set function pointers based on those offsets. SUBR modules had no access to global data of the caller, so they couldn't do things like printf(). They were very fast since you just jumped to a pointer.
> 
> Trap Libraries were accessed through a system call, similar to how the OS-9 system calls were handled. At the start of the TRAP module was some dispatch code to go to the actual functions. TRAP libraries also did not have access to the caller's global storage, but they could have their own data area (if I recall correctly) and maintain their own globals. I *think* the globals stayed unique to the instance (?) but it's been some time since I worked with them.
> 
> Peter Dibble (author of OS-9 Insights, and co-author of the Rainbow Guide to OS-9) developed another variation that used one of these two module types and could do more things. Today, Dibble works for Google.
> 
> It would have been nice to know about the SUBR type of tricks back during the 6809 days -- I know Ultimuse made extensive use of tricks like this to be bigger than 64K.
> -
> Allen Huffman - PO Box 22031 - Clive IA 50325 - 515-999-0227 (vmail/TXT only)
> Sub-Etha Software - http://www.subethasoftware.com - Established 1990!
> Sent from my MacBook.
> 
> 
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
> 



More information about the Coco mailing list