[Coco] C and BASIC09

Robert Gault robert.gault at worldnet.att.net
Fri May 14 22:29:18 EDT 2004


Mannequin* wrote:
> I know everyone is in Chicago by now, but the few of you who are left
> can probably help me out here. :)
> 
> I know that there is a way to run C functions through a BASIC09 program,
> but I was wondering if there was a way to run BASIC09 procedures through
> a C program and receive an integer value back?
> 
> Thanks!
> -M.
> 

The only way you can do that is to use Basic09 to create an executable 
procedure with PACK. That will give you a new command in your command 
directory which runs under RunB.

Just as you must follow certain procedures when using C within a Basic09 
program, you must do similar when going the opposite way. Your Basic09 
procedure may need to accept parameters and output data in a form that 
the C program can accept. The simplest method would be to transfer data 
via the OS-9 path structure. Study the OS-9 Fork and Chain commands and 
how these are used within a C program.

If you want more details, please be very specific about what you want to 
do. You may find that invoking Basic09 is not the best choice.




More information about the Coco mailing list