# OS9 Run Time support for M680x0

See also: Installation of RPC under OS9 .

Under Microware's OS9 operating system, RPC is available to run over TCP/IP, ethernet or RS232 serial links. RPC running over ISO transport protocol is under development. Release notes distributed with the files describe how to make smaller libraries which support only a subset of these media.

## Running over TCP/IPFor this, you will need to link with the socket library as well as the rpc library. The socket library is available from Microware.

See the earlier section on TCP addressing.

## Running over EthernetFor ethernet, the 'elan' driver T. Charity, CERN/EP. If you are using the Aleph network disks, you will already have this driver. is used. See the section above on ethernet addressing for the address format.

## Running over RS232For RS232 (V24) working, the port device descriptors must be in a modifiable address space. This is not the case if they are loaded from EPROM. You can check that it is writable by using the XMODE command to make a change, and then checking that the change has taken effect. Also, all processes must be removed which are in any way connected to the serial port (usually only "tsmon"). See the section above on RS232 addressing.

##

## Langauges and stub generation

## As C is the dominant language in this environment, stubs in C should be used. Programs written in C to run under OS9 may communicate with server and clients on other systems, no matter what langauge they are written in.

The genericC option of the compiler should be used to generate stubs. The "byvalue" qualifier should also be used for C compatibility, while omitting it will give stubs more compatible with FORTRAN.

If you are using FORTRAN, you should use the RTF compiler by Hans Von der Schmitt. The stubs are compiled without the "byvalue" qualifier. In this case, you should avoid passing strings, as they will be passed using the C convention which is not compatible with FORTRAN. To mix OS9 and C and FORTRAN, you will need a special module rtfcstart.a and a special link command lnc developed in OPAL. This allows FORTRAN programs to call C subroutines (including RPC stubs).

Until the RPC compiler has been ported to run under OS9, the stubs must be generated under VAX/VMS or Ultrix and then copied (using FTP, OSWRITE, etc) to OS9 for compilation. This will only have to be repeated if the package definition file is changed, which should happen infrequently.

## LinkingA client or server must be linked with stubs and with the runtime library files. Examples of the creation of a client and a server for OS9 are given below .

##

## Diagnostics

## If your have problems, the RPC system will give you an error message or a bad (even) status return. To get more information, turn on tracing with the command

    	setenv RPC_TRACE_FLAG <file>

giving the filename of your choice. Use the

    	printenv

command to see all environment variables. Setting RPC_TARCE_FLAG to the same thing as PORT will give you trace on the terminal screen.

The trace shows everything the RPC system does on your behalf. You can see all the messages (in hexadecimal), and all the stages in the setting up of the communications. If you report a problem with which you need help, it is useful if you include in your report a copy of the trace file (from both client and server is possible).

The command

    	unsetenv RPC_TRACE_FLAG

turns the tracing off again.

##

## Examples

- See the following examples:
- VMS server for OS9 client
- Client on VMS calls a server on OS9 .